Control system and method and engine control unit for internal combustion engine

ABSTRACT

There are provided a control system and method and an engine control unit for an internal combustion engine, which are capable of properly determining an amount of fuel to be injected during a two-stage fuel injection combustion mode and a duration period of this mode such that stable combustion and smooth transition between combustion modes are ensured, thereby attaining excellent drivability and fuel economy. The combustion mode of the engine is switched between a homogeneous combustion mode in which fuel injection into each cylinder is performed during an intake stroke, a stratified combustion mode in which the fuel injection into the cylinder is performed during a compression stroke, and the two-stage fuel injection combustion mode in which the fuel injection into the cylinder is performed once during the intake stroke and once during the compression stroke during transition between the homogeneous combustion mode and the stratified combustion mode. The control system includes an ECU and a crank angle sensor. The ECU calculates a demanded torque PME demanded of the engine, and determines which of the homogeneous combustion mode, the stratified combustion mode, and the two-stage fuel injection combustion mode should be selected as the combustion mode of the engine, based on the demanded torque PME. The ECU determines an injection time period ToutD during the compression stroke in the two-stage fuel injection combustion mode based on the engine rotational speed.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] This invention relates to a control system and method and anengine control unit for an internal combustion engine of an in-cylinderfuel injection type, the engine being operated while switching acombustion mode thereof between a homogeneous combustion mode in whichfuel injection into each cylinder is performed during an intake stroke,a stratified combustion mode in which the fuel injection into thecylinder is performed during a compression stroke, and a two-stage fuelinjection combustion mode in which the fuel injection into the cylinderis performed once during the intake stroke and once during thecompression stroke during transition between the homogeneous combustionmode and the stratified combustion mode.

[0003] 2. Description of the Prior Art

[0004] Conventionally, a fuel injection control system of theabove-mentioned kind has been proposed e.g. by Japanese Laid-Open PatentPublication (Kokai) No. 11-82135. In this control system, the combustionmode of the engine is selected from the stratified combustion mode, thehomogeneous combustion mode, and the two-stage fuel injection combustionmode, depending on the engine rotational speed and a target torque, andthe engine is controlled to enter the two-stage fuel injectioncombustion mode when the combustion mode is switched between thestratified combustion mode and the homogeneous combustion mode so as toreduce torque steps. In the two-stage fuel injection combustion mode, afinal fuel injection amount which is the sum total of two amounts offuel to be injected during the compression stroke and during the intakestroke, respectively, is determined based on the intake air amount andthe engine rotational speed, and one of the two amounts is set to afixed amount, while the other is determined by subtracting the oneamount (fixed amount) from the final fuel injection amount. Then, thefuel injection is performed during the compression stroke and during theintake stroke by using the one and the other amounts of fuel thusdetermined.

[0005] Further, another control system of the same kind has beenproposed in Japanese Laid-Open Patent Publication (Kokai) No. 11-93731.An internal combustion engine incorporating this control system includesa swirl control valve for control of a swirl of fuel, and an EGR controlvalve for control of the EGR rate. In this control system as well,similarly to the above control system, the combustion mode of the engineis selected from the stratified combustion mode, the homogeneouscombustion mode, and the two-stage fuel injection combustion mode,depending on the engine rotational speed and a target fuel injectionamount (target torque). Further, the engine is controlled to enter thetwo-stage fuel injection combustion mode when the combustion mode isswitched between the stratified combustion mode and the homogeneouscombustion mode, and the duration period of the two-stage fuel injectioncombustion mode is determined based on a difference between a targetvalue of the degree of opening of the swirl control valve and anactually detected value of the same.

[0006] A still another control system of the same kind has been proposedin Japanese Laid-Open Patent Publication (Kokai) No. 11-22508. Similarlyto the above control system, this control system also selects thestratified combustion mode or the homogeneous combustion mode dependingon the engine rotational speed and engine load, and the engine iscontrolled to enter the two-stage fuel injection combustion mode whenthe combustion mode is switched between the stratified combustion modeand the homogeneous combustion mode. In the two-stage fuel injectioncombustion mode, the target air-fuel ratio (equivalent ratio) isprogressively changed between a rich value for the homogeneouscombustion mode and a lean value for the stratified combustion mode byusing a weighted mean value of the target air-fuel ratio. Further, thetotal fuel injection amount is divided into respective amounts of fuelfor injections during the intake stroke and during the compressionstroke such that a ratio between the divided amounts is alsoprogressively changed, to thereby reduce torque steps.

[0007] Of the three conventional control systems described above, thefirst-mentioned control system sets one of the respective amounts offuel to be injected during the compression stroke and during the intakestroke to a fixed value in the two-stage fuel injection combustion mode,and hence if an operating condition of the engine, particularly theengine rotational speed, has changed during this mode, the state of flowof air within the cylinder is changed to vary the minimum fuel injectionamount in which injected fuel can be ignited during the compressionstroke, which sometimes hinders an appropriate air-fuel mixture frombeing formed. As result, the state of combustion of the engine becomesunstable to cause undesired variation in the engine output, whichdegraded drivability and fuel economy.

[0008] Generally, when EGR control is executed, the EGR rate has asignificant influence on the combustion of the mixture, and it isnecessary to properly control the EGR rate to ensure the stability ofcombustion of the engine. Also, in general, so long as the torquedemanded of the engine is identical, the degree of opening of a throttlevalve and the EGR rate set by the EGR control valve are controlled torespective fairly larger values in the stratified combustion mode thanin the homogeneous combustion mode, so that during transition from oneof these modes to the other, it takes time for the EGR control valvecontrolled to a target valve lift amount for one of these combustionmodes to be changed to a target value lift amount for the other. Thatis, the EGR control valve has the lowest response of all devicesdirectly related to the fuel combustion of the engine, and at the sametime the most significant influence thereon. The second-mentionedcontrol system, however, merely determines the duration period of thetwo-stage fuel injection combustion mode based on the difference betweenthe target value of the degree of opening of the swirl control valve andthe actually detected value of the same, so that shortage or excess ofthe EGR rate due to delayed response of the EGR control valve can makethe combustion unstable upon termination of the two-stage fuel injectioncombustion mode. This leads, similarly to the case of thefirst-mentioned control system, to degraded fuel economy, and degradeddrivability due to undesired variation of the engine output.

[0009] Further, the third-mentioned conventional control system onlyprogressively changes the target air-fuel ratio in the two-stage fuelinjection combustion mode between the rich value suitable for thehomogeneous combustion mode and the lean value suitable for thestratified combustion mode, so that when an operating condition of theengine has changed during the two-stage fuel injection combustion mode,the torque actually generated can deviate from a target torque. Thiscauses torque steps upon termination of the two-stage fuel injectioncombustion mode, leading to degraded drivability.

SUMMARY OF THE INVENTION

[0010] It is an object of the invention to provide a control system andmethod and an engine control unit for an internal combustion engine,which are capable of properly determining an amount of fuel to beinjected during a two-stage fuel injection combustion mode and aduration period of the two-stage fuel injection fuel combustion mode,such that stable combustion and smooth transition between combustionmodes are ensured, thereby attaining excellent drivability and fueleconomy.

[0011] To attain the above object, according to a first aspect of theinvention, there is provided a control system for an internal combustionengine of an in-cylinder fuel injection type, the engine being operatedwhile switching a combustion mode thereof between a homogeneouscombustion mode in which fuel injection into each cylinder is performedduring an intake stroke, a stratified combustion mode in which the fuelinjection into the cylinder is performed during a compression stroke,and a two-stage fuel injection combustion mode in which the fuelinjection into the cylinder is performed once during the intake strokeand once during the compression stroke during transition between thehomogeneous combustion mode and the stratified combustion mode.

[0012] The control system according to the first aspect of the inventionis characterized by comprising:

[0013] a demanded torque-calculating module for calculating a demandedtorque which is demanded of the engine;

[0014] an engine rotational speed-detecting module for detecting arotational speed of the engine;

[0015] a combustion mode-determining module for determining, based onthe calculated demanded torque, which of the homogeneous combustionmode, the stratified combustion mode, and the two-stage fuel injectioncombustion mode should be selected as the combustion mode; and

[0016] a fuel injection amount-determining module for determining anamount of fuel to be injected during the compression stroke in thetwo-stage fuel injection combustion mode, based on the detectedrotational speed of the engine.

[0017] According to this control system for an internal combustionengine, the combustion mode-determining module determines, based on thedemanded torque which is demanded of the engine, which of thehomogeneous combustion mode, the stratified combustion mode, and thetwo-stage fuel injection combustion mode should be selected as thecombustion mode. Further, when the selected combustion mode is thetwo-stage fuel injection combustion mode, the amount of fuel to beinjected during the compression stroke is determined by the fuelinjection amount-determining module based on the rotational speed of theengine. This makes it possible to set the amount of fuel to be injectedduring the compression stroke in the two-stage fuel injection mode tothe minimum amount in which the injected fuel can be ignited, whiletaking into account a change in the flow of air within the cylindercaused by a change in the rotational speed of the engine even when thechange in the flow of air within the cylinder is caused. Conversely, itis possible to secure as long a fuel injection time period as possiblefor the intake stroke in which an air-fuel mixture in an easilyflammable condition is produced. As a result, it is possible to ensurestable combustion of fuel injected in the two-stage fuel injectioncombustion mode, and excellent fuel economy and drivability.

[0018] To attain the above object, according to a second aspect of theinvention, there is provided a control method for an internal combustionengine of an in-cylinder fuel injection type, the engine being operatedwhile switching a combustion mode thereof between a homogeneouscombustion mode in which fuel injection into each cylinder is performedduring an intake stroke, a stratified combustion mode in which the fuelinjection into the cylinder is performed during a compression stroke,and a two-stage fuel injection combustion mode in which the fuelinjection into the cylinder is performed once during the intake strokeand once during the compression stroke during transition between thehomogeneous combustion mode and the stratified combustion mode.

[0019] The control method according to the second aspect of theinvention is characterized by comprising the steps of:

[0020] calculating a demanded torque which is demanded of the engine;

[0021] detecting a rotational speed of the engine;

[0022] determining, based on the calculated demanded torque, which ofthe homogeneous combustion mode, the stratified combustion mode, and thetwo-stage fuel injection combustion mode should be selected as thecombustion mode; and

[0023] determining an amount of fuel to be injected during thecompression stroke in the two-stage fuel injection combustion mode,based on the detected rotational speed of the engine.

[0024] This control method provides the same advantageous effects asdescribed above concerning the control system according to the firstaspect of the invention.

[0025] To attain the above object, according to a third aspect of theinvention, there is provided an engine control unit including a controlprogram for causing a computer to carry out control of an internalcombustion engine of an in-cylinder fuel injection type, the enginebeing operated while switching a combustion mode thereof between ahomogeneous combustion mode in which fuel injection into each cylinderis performed during an intake stroke, a stratified combustion mode inwhich the fuel injection into the cylinder is performed during acompression stroke, and a two-stage fuel injection combustion mode inwhich the fuel injection into the cylinder is performed once during theintake stroke and once during the compression stroke during transitionbetween the homogeneous combustion mode and the stratified combustionmode.

[0026] The engine control unit according to the third aspect of theinvention is characterized in that the control program causes thecomputer to calculate a demanded torque which is demanded of the engine,detect a rotational speed of the engine, determine, based on thecalculated demanded torque, which of the homogeneous combustion mode,the stratified combustion mode, and the two-stage fuel injectioncombustion mode should be selected as the combustion mode, and determinean amount of fuel to be injected during the compression stroke in thetwo-stage fuel injection combustion mode, based on the detectedrotational speed of the engine.

[0027] This engine control unit provides the same advantageous effectsas described above concerning the control system according to the firstaspect of the invention.

[0028] Preferably, the control system further includes a storage modulefor storing data of a fuel injection timing for the homogeneouscombustion mode and a fuel injection timing for the stratifiedcombustion mode, which are set in advance in a manner correlated to anoperating condition of the engine, an operating condition-detectingmodule for detecting the operating condition of the engine, and a fuelinjection timing-setting module for setting a fuel injection timingduring the intake stroke and a fuel injection timing during thecompression stroke in the two-stage fuel injection combustion mode, tothe fuel injection timing for the homogeneous combustion mode and thefuel injection timing for the stratified combustion mode, respectively,in dependence on the detected operating condition of the engine.

[0029] According to this preferred embodiment of the control system, thefuel injection timing during the intake stroke and that during thecompression stroke in the two-stage fuel injection combustion mode areset by the fuel injection timing-determining module to the fuelinjection timing for the homogeneous combustion mode and that for thestratified combustion mode stored in the storage module, respectively,in dependence on the detected operating condition of the engine. Thismakes it possible to execute fuel injection during the intake stroke andthat during the compression stroke in the two-stage fuel injectioncombustion mode at respective appropriate timings. Further, it is notnecessary to separately or additionally provide a device for determiningthese fuel injection timings in the two-stage fuel injection combustionmode or software therefor, so that the manufacturing costs can bereduced by so much amount.

[0030] Preferably, the control method further includes the steps ofstoring data of a fuel injection timing for the homogeneous combustionmode and a fuel injection timing for the stratified combustion mode,which are set in advance in a manner correlated to an operatingcondition of the engine, detecting the operating condition of theengine, and setting a fuel injection timing during the intake stroke anda fuel injection timing during the compression stroke in the two-stagefuel injection combustion mode, to the fuel injection timing for thehomogeneous combustion mode and the fuel injection timing for thestratified combustion mode, respectively, in dependence on the detectedoperating condition of the engine.

[0031] This preferred embodiment of the control method provides the sameadvantageous effects as provided by the corresponding preferredembodiment of the control system.

[0032] Preferably, the control program further causes the computer tostore data of a fuel injection timing for the homogeneous combustionmode and a fuel injection timing for the stratified combustion mode,which are set in advance in a manner correlated to an operatingcondition of the engine, detect the operating condition of the engine,and set a fuel injection timing during the intake stroke and a fuelinjection timing during the compression stroke in the two-stage fuelinjection combustion mode, to the fuel injection timing for thehomogeneous combustion mode and the fuel injection timing for thestratified combustion mode, respectively, in dependence on the detectedoperating condition of the engine.

[0033] This preferred embodiment of the engine control unit provides thesame advantageous effects as provided by the corresponding preferredembodiment of the control system.

[0034] More preferably, the control system further includes an ignitiontiming-determining module for determining ignition timing for thetwo-stage fuel injection combustion mode, based on the detectedrotational speed of the engine and the fuel injection timing for thestratified combustion mode.

[0035] As described hereinabove, while the engine rotational speed has asignificant influence on the stability of combustion in the two-stagefuel injection combustion mode, the fuel injection timing during thecompression stroke in the two-stage fuel injection combustion mode isthe fuel injection timing for the stratified combustion mode. The fuelinjected this time is involved in the ignition of the whole injectedfuel. According to this preferred embodiment of the control system, theignition timing-determining module determines the ignition timing in thetwo-stage fuel injection combustion mode based on the engine rotationalspeed and the fuel injection timing for the stratified combustion mode.This makes it possible to set the ignition timing such that stable orreliable ignition can be ensured in the two-stage fuel injection rawcombustion mode, whereby further stable combustion can be ensured.

[0036] More preferably, the control method further includes the step ofdetermining ignition timing for the two-stage fuel injection combustionmode, based on the detected rotational speed of the engine and the fuelinjection timing for the stratified combustion mode.

[0037] This preferred embodiment of the control method provides the sameadvantageous effects as provided by the corresponding preferredembodiment of the control system.

[0038] More preferably, the control program further causes the computerto determine ignition timing for the two-stage fuel injection combustionmode, based on the detected rotational speed of the engine and the fuelinjection timing for the stratified combustion mode.

[0039] This preferred embodiment of the engine control unit provides thesame advantageous effects as provided by the corresponding preferredembodiment of the control system.

[0040] The engine includes an intake system, and preferably, the controlsystem further includes an EGR control valve for controlling an EGR rateat which exhaust gases are recirculated into the intake system, and aduration period-determining module for determining a duration period ofthe two-stage fuel injection combustion mode, based on a parameterindicative of response of the EGR control valve.

[0041] According to this preferred embodiment of the control system, theduration period-determining module determines the duration period of thetwo-stage fuel injection combustion mode in dependence on a parameterindicative of the response of the EGR control valve. This enables thetwo-stage fuel injection combustion mode to be continued until theactual valve lift amount of the EGR control valve is positively changedsuch that it becomes substantially equal to the target valve lift amountof the EGR control valve set for a combustion mode following the presenttwo-stage fuel injection combustion mode. As a result, the stablecombustion can be ensured upon termination of the two-stage fuelinjection combustion mode, whereby stable drivability in which theengine output variation is small can be ensured. Further, since theduration period of the two-stage fuel injection combustion mode isdetermined as described above, it can be reduced to the minimumnecessary time period, whereby the degradation of fuel economy can beprevented.

[0042] The engine includes an intake system and an EGR control valve,and preferably, the control method further includes the steps ofcontrolling an EGR rate at which exhaust gases are recirculated via theEGR control valve into the intake system, and determining a durationperiod of the two-stage fuel injection combustion mode, based on aparameter indicative of response of the EGR control valve.

[0043] This preferred embodiment of the control method provides the sameadvantageous effects as provided by the corresponding preferredembodiment of the control system.

[0044] The engine includes an intake system and an EGR control valve,and preferably, the control program further causes the computer tocontrol an EGR rate at which exhaust gases are recirculated via the EGRcontrol valve into the intake system, and determine a duration period ofthe two-stage fuel injection combustion mode, based on a parameterindicative of response of the EGR control valve.

[0045] This preferred embodiment of the engine control unit provides thesame advantageous effects as provided by the corresponding preferredembodiment of the control system.

[0046] Preferably, the fuel injection amount-determining module sets theamount fuel to be injected during the compression stroke in thetwo-stage fuel injection combustion mode to a smaller valve as therotational speed of the engine is higher.

[0047] Preferably, the step of determining the amount of fuel to beinjected includes setting the amount fuel to be injected during thecompression stroke in the two-stage fuel injection combustion mode to asmaller valve as the rotational speed of the engine is higher.

[0048] Preferably, when the control program causes the computer todetermine the amount of fuel to be injected, the control program causesthe computer to set the amount fuel to be injected during thecompression stroke in the two-stage fuel injection combustion mode to asmaller valve as the rotational speed of the engine is higher.

[0049] More preferably, the control system includes an appliedmode-changing module for causing a total amount of fuel for thetwo-stage fuel injection combustion mode to be injected at an injectiontiming for the stratified combustion mode, if a sum total of the amountof fuel to be injected during the compression stroke in the two-stagefuel injection combustion mode determined by the fuel injectionamount-determining module and a predetermined fuel injection amount isequal to or smaller than the total amount of fuel.

[0050] More preferably, the control method includes the step of causinga total amount of fuel for the two-stage fuel injection combustion modeto be injected at an injection timing for the stratified combustionmode, if a sum total of the amount of fuel to be injected during thecompression stroke in the two-stage fuel injection combustion modedetermined by the step of determining the amount of fuel to be injectedand a predetermined fuel injection amount is equal to or smaller thanthe total amount of fuel.

[0051] More preferably, the control program causes the computer to causea total amount of fuel for the two-stage fuel injection combustion modeto be injected at an injection timing for the stratified combustionmode, if a sum total of the determined amount of fuel to be injectedduring the compression stroke in the two-stage fuel injection combustionmode and a predetermined fuel injection amount is equal to or smallerthan the total amount of fuel.

[0052] More preferably, the homogeneous combustion mode comprises astoichiometric combustion mode in which an air-fuel mixture having anair-fuel ratio equal to or richer than a stoichiometric air fuel ratiois burned, and a lean combustion mode in which an air-fuel mixturehaving an air-fuel ratio leaner than the stoichiometric air-fuel ratiois burned, and the fuel injection timing-setting module sets the fuelinjection timing during the intake stroke in the two-stage fuelinjection combustion mode to a fuel injection timing for thestoichiometric combustion mode when a combustion mode preceding thetwo-stage fuel injection combustion mode is the stoichiometriccombustion mode, and to a fuel injection timing for the lean combustionmode when the combustion mode preceding the two-stage fuel injectioncombustion mode is other than the stoichiometric combustion mode.

[0053] More preferably, the homogeneous combustion mode comprises astoichiometric combustion mode in which an air-fuel mixture having anair-fuel ratio equal to or richer than a stoichiometric air fuel ratiois burned, and a lean combustion mode in which an air-fuel mixturehaving an air-fuel ratio leaner than the stoichiometric air-fuel ratiois burned, and the step of setting the fuel injection timing includessetting the fuel injection timing during the intake stroke in thetwo-stage fuel injection combustion mode to a fuel injection timing forthe stoichiometric combustion mode when a combustion mode preceding thetwo-stage fuel injection combustion mode is the stoichiometriccombustion mode, and to a fuel injection timing for the lean combustionmode when the combustion mode preceding the two-stage fuel injectioncombustion mode is other than the stoichiometric combustion mode.

[0054] More preferably, the homogeneous combustion mode comprises astoichiometric combustion mode in which an air-fuel mixture having anair-fuel ratio equal to or richer than a stoichiometric air fuel ratiois burned, and a lean combustion mode in which an air-fuel mixturehaving an air-fuel ratio leaner than the stoichiometric air-fuel ratiois burned, and when the control program causes the computer to set thefuel injection timing, the control program causes the computer to setthe fuel injection timing during the intake stroke in the two-stage fuelinjection combustion mode to a fuel injection timing for thestoichiometric combustion mode when a combustion mode preceding thetwo-stage fuel injection combustion mode is the stoichiometriccombustion mode, and to a fuel injection timing for the lean combustionmode when the combustion mode preceding the two-stage fuel injectioncombustion mode is other than the stoichiometric combustion mode.

[0055] Preferably, the control system further includes an operationcontrol values-setting module for setting at least a target air-fuelratio, a target EGR rate, a fuel injection timing, and an ignitiontiming, in dependence on the combustion mode determined to be selected.

[0056] According to this preferred embodiment of the control system, theoperation control values-setting module sets at least a target air-fuelratio, a target EGR rate, a fuel injection timing, and an ignitiontiming, in dependence on the combustion mode determined to be selected,and therefore, by using these parameters, it is possible to control thetwo-stage fuel injection combustion mode and the combustion modes beforeand after the two-stage fuel injection combustion mode such that thetorque generated by the engine becomes equal to the demanded torque. Asa result, differently from the prior art, it is possible to preventtorque steps from being caused upon the start or the termination of thetwo-stage fuel injection combustion mode.

[0057] Preferably, the control method includes the step of setting atleast a target air-fuel ratio, a target EGR rate, a fuel injectiontiming, and an ignition timing, in dependence on the combustion modedetermined to be selected.

[0058] This preferred embodiment of the control method provides the sameadvantageous effects as provided by the corresponding preferredembodiment of the control system.

[0059] Preferably, the control program causes the computer to set atleast a target air-fuel ratio, a target EGR rate, a fuel injectiontiming, and an ignition timing, in dependence on the combustion modedetermined to be selected.

[0060] This preferred embodiment of the engine control unit provides thesame advantageous effects as provided by the corresponding preferredembodiment of the control system.

[0061] The engine includes a fuel injection valve for injecting the fuelinto the cylinder, the cylinder having a top wall facing a combustionchamber, and preferably, the fuel injection valve is arranged in acentral portion of the top wall such that the fuel injection valveinjects the fuel downward therefrom.

[0062] According to this preferred embodiment, the advantageous effectsby the control system and method and the engine control unit accordingto the respective aspects of the invention and their preferredembodiments described above can be obtained in an optimized manner.

[0063] The above and other objects, features, and advantages of theinvention will become more apparent from the following detaileddescription taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0064]FIG. 1 is a block diagram schematically showing the arrangement ofan internal combustion engine incorporating a control system thereforaccording to an embodiment of the invention;

[0065]FIG. 2 is a flowchart showing a main routine of a fuel injectioncontrol process carried out by the FIG. 1 control system;

[0066]FIG. 3 shows a map for use in determining a value of a monitorS_EMOD used at a step S1 in FIG. 2;

[0067]FIG. 4 is a flowchart showing a subroutine for carrying out astoichiometric combustion mode control process which is executed at astep S13 in FIG. 2;

[0068]FIG. 5 is a flowchart showing a subroutine for carrying out a leancombustion mode control process which is executed at a step S14 in FIG.2;

[0069]FIG. 6 is a flowchart showing a subroutine for carrying out astratified combustion mode control process which is executed at a stepS15 in FIG. 2;

[0070]FIG. 7 is a flowchart showing a subroutine for carrying out atwo-stage fuel injection combustion mode control process which isexecuted at a step S16 in FIG. 2;

[0071]FIG. 8 is a flowchart showing a subroutine for aTibase-calculating process executed in the subroutines in FIG. 4 to FIG.7;

[0072]FIG. 9 is a flowchart showing a subroutine for an LCMD-calculatingprocess executed in the subroutines in FIG. 4 to FIG. 7;

[0073]FIG. 10 is a flowchart showing a subroutine for a fuel injectiontiming-calculating process executed in the subroutines in FIG. 4 to FIG.7;

[0074]FIG. 11 shows an example of an NE-ToutdbD table;

[0075]FIG. 12 is a flowchart showing a subroutine for carrying out afuel injection termination timing-calculating process for astoichiometric combustion mode, which is executed at a step S132 in FIG.10;

[0076]FIG. 13 shows an example of a TW-IJTW table;

[0077]FIG. 14 is a flowchart showing a subroutine for carrying out afuel injection termination timing-calculating process for a leancombustion mode, which is executed at a step S135 in FIG. 10;

[0078]FIG. 15 is a flowchart showing a subroutine for carrying out afuel injection termination timing-calculating process for a stratifiedcombustion mode, which is executed at a step S136 in FIG. 10;

[0079]FIG. 16 is a flowchart showing a subroutine for carrying out afuel injection termination timing-calculating process for a two-stagefuel injection combustion mode, which is executed at a step S140 in FIG.10;

[0080]FIG. 17 is a flowchart showing a subroutine for carrying out aKCMD-calculating process which is executed at a step S83 in FIG. 7;

[0081]FIG. 18 is a flowchart showing a main routine for carrying out afuel injection timing control process;

[0082]FIG. 19 is a flowchart showing an IGMAP-calculating process whichis execute at a step S220 in FIG. 18;

[0083]FIG. 20 is a flowchart showing an IGMAPm-retrieving process forthe stoichiometric combustion mode, which is execute at a step S232 inFIG. 19;

[0084]FIG. 21 is a flowchart showing an IGMAPm-retrieving process forthe lean combustion mode, which is execute at a step S234 in FIG. 19;

[0085]FIG. 22 is a flowchart showing an IGMAPm-retrieving process forthe stratified combustion mode, which is execute at a step S235 in FIG.19;

[0086]FIG. 23 is a flowchart showing a correction term-calculatingprocess which is executed at a step S222 in FIG. 18;

[0087]FIG. 24 is a flowchart showing a subroutine for carrying out anIGTWR-calculating process which is executed at a step 285 in FIG. 23;

[0088]FIG. 25 shows an example of a TW-IGTWR table for use in theIGTWR-calculating process in FIG. 24;

[0089]FIG. 26 is a flowchart showing a variation of theIGTWR-calculating process executed at the step S285 in FIG. 23;

[0090]FIG. 27 is a flowchart showing a routine for carrying out acombustion mode transition-determining process; and

[0091]FIG. 28 is a flowchart showing a variation of the subroutine forcarrying out the combustion mode transition-determining process.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0092] The invention will now be described in detail with reference tothe drawings showing a preferred embodiment thereof. Referring first toFIG. 1, there is schematically shown the arrangement of a control systemfor an internal combustion engine, according to an embodiment of theinvention. As shown in the figure, the control system 1 includes an ECU2. The ECU 2 carries out a fuel injection control process, an ignitiontiming control process, and a combustion mode transition-determiningprocess for the internal combustion engine 3 (hereinafter simplyreferred to as “the engine 3”).

[0093] The engine 3 is a straight type four-cylinder gasoline engine foran automotive vehicle, not shown. The engine 3 has four cylinders (onlyone of which is shown) in each of which a combustion chamber 3 c isformed between the piston 3 a and a cylinder head 3 b. The piston 3 ahas a central portion of a top surface thereof formed with a recess 3 d.The cylinder head 3 b has a fuel injection valve 4 (hereinafter simplyreferred to as “the injector 4”) and a spark plug 5 mounted therein suchthat they face the combustion chamber 3 c. The engine 3 is a so-calledin-cylinder fuel injection type in which fuel is directly injected intothe combustion chamber 3 c.

[0094] The injector 4 is arranged in a central portion of a top wall ofthe combustion chamber 3 c and connected to a high-pressure pump 4 b viaa fuel pipe 4 a. Fuel is pressurized by the high-pressure pump to a highpressure, and then supplied to the injector 4 in a state of the pressurethereof regulated by a regulator, not shown. The fuel is injected fromthe injector 4 toward the recess 3 d of the piston 3 a, and hits the topsurface of the piston 3 a including the recess 3 d to form fuel jets.Particularly, in a stratified combustion mode, referred to hereinafter,most of the fuel injected by the injector 4 hits the recess 3 d to formfuel jets.

[0095] A fuel pressure sensor 20 is mounted in a portion of the fuelpipe 4 a at a location in the vicinity of the injector 4. The fuelpressure sensor 20 detects a fuel pressure PF of the fuel injected bythe injector 4 and delivers a signal indicative of the sensed fuelpressure PF to the ECU 2. Further, the injector 4 is electricallyconnected to the ECU 2, and a final fuel injection time period Tout(i.e. fuel injection amount) over which the injector 4 is open and afuel injection timing θinj (i.e. a valve-opening timing and avalve-closing timing of the injector 4) are controlled by a drive signaldelivered from the ECU 2 to the injector 4, as referred to hereinafter.

[0096] The spark plug 5 is also connected to the ECU 2, and a highvoltage is applied to the spark plug 5 at an ignition timing IGindicated by a drive signal delivered from the ECU 2, for electricdischarge, whereby an air-fuel mixture is burned in the combustionchamber 3 c.

[0097] The engine 3 is of a DOHC type and includes an intake camshaft 6and an exhaust camshaft 7. The intake and exhaust cam shafts 6 and 7have intake cams 6 a and exhaust cams 7 a, respectively, for opening andclosing the intake valves 8 and exhaust valves 9. The intake and exhaustcamshafts 6, 7 are connected to a crankshaft 3 e via a timing belt, notshown, and each rotate once for every two rotations of the crankshaft 3e. The intake camshaft 6 has one end thereof provided with a cam phasechange mechanism (hereinafter referred to as “VTC”) 10.

[0098] The VTC 10 is driven by oil pressure, for continuously orsteplessly advancing or retarding the phase angle (hereinafter referredto as “the cam phase CAIN”) of the intake cam 6 a relative to thecrankshaft 3 e, whereby the opening/closing timing of each intake valve8 is advanced or retarded. This increases or decreases a valve overlapof the intake valve 8 and the exhaust valve 9, to thereby increase ordecrease an internal EGR rate, and change the changing efficiency. TheVTC 10 has a solenoid control valve 10 a connected thereto which isdriven by a drive signal from the ECU 2 to supply the oil pressure froman hydraulic pump, not shown, of a lubricating system of the engine 3 tothe VTC 10, according to the duty ratio of the drive signal. Thus, theVTC 10 is controlled by the ECU 2 via the solenoid control valve 11, foradvancing or retarding the cam phase CAIN.

[0099] A cam angle sensor 21 is arranged at the other end of the intakecamshaft 6 opposite to the one end at which the VTC 10 is arranged. Thecam angle sensor 21 is comprised e.g. of a magnet rotor and an MRE(magnetic resistance element) pickup, and delivers a CAM signal, whichis a pulse signal, to the ECU 2 whenever the intake camshaft 6 rotatesthrough a predetermined cam angle (e.g. one degree). The ECU 2determines the actual cam phase CAIN from the CAM signal and a CRKsignal, referred to hereinafter.

[0100] Further, although not shown in the figure, the intake cam 6 a andthe exhaust cam 7 a are each comprised of a low-speed cam, and ahigh-speed cam having a higher cam nose than that of the low-speed cam.Further, the engine 3 is provided with a plurality of valve timingchangeover mechanisms 11 (hereinafter referred to as “the VTEC's 11”).Each VTEC 11 switches each of the intake cam 6 a and the exhaust cam 7 aof each cylinder between the low-speed cam and the high-speed cam, tothereby change the valve timing of the intake valve 8 and the exhaustvalve 9 between a low-speed valve timing (hereinafter referred to as“LO.VT”) and a high-speed valve timing (hereinafter referred to as“HI.VT”). During the HI.VT, the valve-opening time periods over whichthe respective intake valve 8 and exhaust valve 9 are open and the valveoverlap over which they are simultaneously open become longer and thevalve lift amounts of them also become larger than during the LO.VT,thereby realizing a higher charging efficiency. The VTEC 11 is alsodriven by oil pressure supplied via a VTEC solenoid control valve 11 adriven by the ECU 2, for execution of the above switching operations.

[0101] Further, the valve timing is set to LO.VT in a lean combustionmode included in a homogeneous combustion mode, the stratifiedcombustion mode, and a two-stage fuel injection combustion mode, allreferred to hereinafter, whereas it is set to HI.VT in a stoichiometriccombustion mode and a rich combustion mode included in the homogeneouscombustion mode, referred to hereinafter.

[0102] The crankshaft 3 e has a magnet rotor 22 a fitted thereon whichconstitutes a crank angle position sensor 22 together with an MRE(magnetic resistance element) pickup 22 b. The crank angle positionsensor 22 (engine rotational speed-detecting module, operatingcondition-detecting module) delivers to the ECU 2 the CRK signal and aTDC signal, which are both pulse signals, in accordance with rotation ofthe crankshaft 3 e.

[0103] Each pulse of the CRK signal (CRK signal pulse) is generatedwhenever the crankshaft 3 e rotates through a predetermined angle (e.g.30 degrees). The ECU 2 determines a rotational speed NE (parameterindicative of an operating condition of the engine, hereinafter referredto as “the engine rotational speed NE”) of the engine 3, based on theCRK signal. The TDC signal (TDC signal pulse) is indicative of apredetermined crank angle position of each cylinder in the vicinity of atop dead center (TDC) position at the start of an intake stroke of thepiston 3 a in the cylinder, and each pulse of the TDC signal isgenerated whenever the crankshaft rotates through 180 degrees in thecase of the four-cylinder engine 3 according to the embodiment. Further,the engine 3 is provided with a cylinder-discriminating sensor, notshown. The cylinder-discriminating sensor generates acylinder-discriminating signal, which is a pulse signal fordiscriminating each cylinder from the other ones, to deliver the signalto the ECU 2. The ECU 2 determines which of the strokes and which crankangle position in the determined stroke each cylinder is in, based onthe cylinder-discriminating signal, the CRK signal, and the TDC signal.

[0104] An engine coolant temperature sensor 23 (operatingcondition-detecting module) formed of a thermistor is mounted in thecylinder block of the engine 3. The engine coolant temperature sensor 23senses an engine coolant temperature TW (parameter indicative of anoperating condition of the engine) which is a temperature of an enginecoolant circulating within the cylinder block of the engine 3, andsupplies an electric signal indicative of the sensed engine coolanttemperature to the ECU 2.

[0105] The engine 3 has an intake pipe 12 having a throttle valve 13arranged therein. The throttle valve 13 is driven by an electric motor13 a connected thereto to have its throttle valve opening (degree ofopening of the throttle valve) TH varied. Further, attached to thethrottle valve 7 is a throttle valve opening sensor 32 which senses thethrottle valve opening TH of the throttle valve 7 to deliver a signalindicative of the sensed throttle valve opening TH to the ECU 2. The ECU2 controls the throttle valve opening TH via the electric motor 13 a independence on the operating conditions of the engine 3, to therebycontrol the amount of intake air supplied to the engine 3.

[0106] At a location downstream of the throttle valve 13 arranged in theintake pipe 12, there is arranged an intake pipe absolute pressuresensor 24 in a manner inserted into the intake pipe 12. The intake pipeabsolute pressure sensor 24 is formed e.g. by a semiconductor pressuresensor, and senses an intake pipe absolute pressure PBA within theintake pipe 12 to deliver a signal indicative of the sensed absolutepressure PBA to the ECU 2. Further, an intake air temperature sensor 25is inserted into the intake pipe 12. The intake air temperature sensor25 is formed of a thermistor, and senses an intake air temperature TAwithin the intake pipe 12 to deliver a signal indicative of the sensedintake air temperature TA to the ECU 2.

[0107] Further, the engine 3 has an EGR pipe 15 connecting between aportion of the intake pipe 12 at a location downstream of the throttlevalve and a portion of an exhaust pipe 14 at a location upstream of acatalytic device, not shown, arranged in the exhaust pipe 14. Exhaustgases emitted from the engine 3 are recirculated to an intake side ofthe engine 3 through the EGR pipe 15 to lower a combustion temperaturewithin the combustion chamber 3 c, whereby EGR operation is carried outto reduce NOx contained in the exhaust gases.

[0108] The EGR pipe 15 has an EGR control valve 16 mounted therein. TheEGR control valve 16 is formed by a linear solenoid valve. The amount ofvalve lift (valve lift amount) of the EGR control valve 15 is changedlinearly in response to a drive signal from the ECU 2, whereby the EGRpipe 15 is opened and closed. The EGR control valve 16 is provided witha valve lift sensor 26 that senses an actual valve lift amount LACT ofthe EGR control valve 16 to deliver a signal indicative of the sensedvalve lift amount to the ECU 2.

[0109] The ECU 2 calculates a target valve lift amount LCMD (target EGRrate) of the EGR control valve 16 in dependence on operating conditionsof the engine 3 and controls the EGR control valve 12 such that theactual valve lift amount LACT becomes equal to the target valve liftamount LCMD, to thereby control the EGR rate. The calculation of thetarget valve lift amount LCMD will be described in detail hereinafter.

[0110] A LAF sensor 27 is arranged in the exhaust pipe 14 at a locationupstream of the catalyst device. The LAF sensor 27 is comprised ofzirconia and platinum electrodes, and linearly detects the concentrationof oxygen in exhaust gases in a broad air-fuel ratio range from a richregion to a lean region, to deliver a signal proportional to the sensedconcentration of oxygen to the ECU 2. Further, an 02 sensor, not shown,is arranged in the exhaust pipe 14 at a location downstream of thecatalyst device, for detecting oxygen concentration of exhaust gases ona downstream side of the catalyst device to deliver a signal having asignal value proportional to the detected oxygen concentration.

[0111] Further, the engine 3 has an atmospheric pressure sensor 28mounted thereto. The atmospheric pressure sensor 28 is formed e.g. by asemiconductor pressure sensor and senses atmospheric pressure PA todeliver a signal indicative of the sensed atmospheric pressure PA to theECU 2. Further, the ECU 2 has a battery voltage sensor 29 connectedthereto. The battery voltage sensor 29 detects a voltage VB of abattery, not shown, which supplies a drive voltage to the injectors 4,and delivers a signal indicative of the sensed voltage VB to the ECU 2.

[0112] An accelerator pedal sensor 30 is mounted in an automotivevehicle on which the engine 3 is installed. The accelerator pedal sensor30 detects an accelerator pedal opening AP, which represents anoperation amount or stepping amount of an accelerator pedal, not shown,and delivers a signal indicative of the sensed accelerator pedal openingAP to the ECU 2. Further, an automatic transmission, not shown, of theengine 3 has a gear stage sensor 31 attached thereto, for detecting agear stage NGAR of the automatic transmission to send a signalindicative of the detected gear stage to the ECU 2.

[0113] The ECU 2 (demanded torque-calculating module, engine rotationalspeed-detecting module, combustion mode-determining module, fuelinjection amount-determining module, operating condition-detectingmodule, fuel injection timing-determining module, ignitiontiming-determining module, duration period-determining module, operationcontrol values-setting module) is formed by a microcomputer (not shown)including a CPU 2 a, a RAM 2 b, a ROM 2 c, and an I/O interface (notshown). The signals input from the sensors 20 to 32 to the ECU 2 areeach delivered to the I/O interface for A/D conversion and waveformshaping, and then input into the CPU 2 a. The CPU 2 a carries outvarious kinds of arithmetic operations based on control programs,various tables and maps, referred to hereinafter, stored in the ROM 2 c(storage module), and various flags and calculation values, referred tohereinafter, stored in the RAM 2 b.

[0114] More specifically, the ECU 2 determines an operating condition ofthe engine from various signals of those described above, and switchesthe combustion mode (mode of combustion) of the engine 3 based on theresult of the determination, e.g. to the stratified combustion mode whenthe engine is under a very low load operating condition e.g. duringidling of the engine, and to the homogeneous combustion mode when theengine is in an operating condition other than the very low loadoperating condition. In switching the combustion mode, the ECU 2 setsthe engine 3 to the two-stage fuel injection combustion mode. Further,in dependence on the combustion mode, the ECU 2 controls a final fuelinjection period Tout and a fuel injection timing θinj for each injector4 to thereby execute the fuel injection control process including theair-fuel ratio (A/F) feedback control, and at the same time, controlsignition timing IG of the spark plugs 5 and so forth.

[0115] In the stratified combustion mode, fuel is injected into thecombustion chamber 3 c during the compression stroke such that most ofthe injected fuel hits against the recess 3 d, thereby forming fueljets. The fuel jets and a flow of air taken in from the intake pipe 12form an air-fuel mixture. At this time, the piston 3 a in thecompression stroke is near the top dead center position, which causesthe air-fuel mixture which is extremely leaner than the stoichiometricair-fuel ratio (e.g. 27 to 60) to be unevenly distributed in thecombustion chamber i.e. concentrated in the vicinity of the spark plug 5whereby the mixture is burned by stratified combustion.

[0116] On the other hand, in the homogeneous combustion mode, fuel isinjected into the combustion chamber 3 c during the intake stroke suchthat a richer air-fuel mixture (having an air-fuel ratio of e.g. 12 to22) than an air-fuel mixture in the stratified combustion mode is formedby fuel jets and a flow of air and homogeneously distributed in thecombustion chamber 3 c, whereby the mixture is burned by homogeneouscombustion.

[0117] Further, in the two-stage fuel injection combustion mode, fuelinjection is carried out two times per cycle of engine operation, with atime interval therebetween, to burn an air-fuel mixture having a richerA/F (e.g. 12 to 22) than in the stratified combustion mode. The two fuelinjecting operations are carried out during the intake stroke and duringthe compression stroke, respectively.

[0118] In the following, the fuel injection control process includingthe air-fuel ratio (A/F) feedback control process, which is executed bythe ECU 2, will be described in detail with reference to FIGS. 2 to 17.FIG. 2 shows a main routine for carrying out this control process, whichis executed by an interrupt handling routine in synchronism with inputof each TDC signal pulse. As described hereinafter, in the fuelinjection control process, a combustion mode monitor S_EMOD isdetermined at a step S1, and then various correction coefficients arecalculated (steps S2 to S9). Further, depending on a value of acombustion mode transition flag F_CMOD and a value of the combustionmode monitor S_EMOD, each combustion mode control process is executed(steps S10 to S16).

[0119] First, at a step S1, the combustion mode is determined in themanner described hereafter, and a value of the combustion mode monitorS_EMOD indicative of the determined combustion mode is set. That is,demanded torque PME (demanded output) is determined by searching a map,not shown, based on the engine rotational speed NE and the acceleratorpedal opening AP, and based on the demanded torque PME and the enginerotational speed NE, a map shown in FIG. 3 is searched to therebydetermine a combustion mode and set a value of the combustion modemonitor S_EMOD. More specifically, with reference to the FIG. 3 map, itis determined that the stratified combustion mode should be selected asthe combustion mode when the operating condition of the engine is in astratified combustion region in which the demanded torque PME and theengine rotational speed NE are both low, and the combustion mode monitorS_EMOD is set to 2. When the operating condition of the engine is in alean combustion region of a homogeneous combustion region, in which thedemanded torque PME and the engine rotational speed NE are higher thanin the stratified combustion region, it is determined that the leancombustion mode should be selected as the combustion mode, and thecombustion mode monitor S_EMOD is set to 1. Further, when the operatingcondition of the engine is in a stoichiometric combustion region of thehomogeneous combustion region, in which the demanded torque PME and theengine rotational speed NE are still higher than in the lean combustionregion, it is determined that the stoichiometric combustion mode shouldbe selected as the combustion mode, and the combustion mode monitorS_EMOD is set to 0. It should be noted that the stoichiometriccombustion region set in the map includes not only a region in whichessentially an air-fuel mixture having an air-fuel ratio equal to thestoichiometric air-fuel ratio is burned, but also a region in which anair-fuel mixture having an air-fuel ratio richer than the stoichiometricair-fuel ratio is burned. Therefore, the term “stoichiometriccombustion” used hereinafter is intended to include “rich combustion”.

[0120] Then, the program proceeds to a step S2, wherein an initial valueof a start-dependent correction coefficient KAST is calculated. Thestart-dependent correction coefficient KAST is used for increasing thefuel injection amount when the engine 3 is started.

[0121] Then, the program proceeds to a step S3, wherein a correctioncoefficient KOBSV is set to an initial value thereof. The correctioncoefficient KOBSV is a correction value used in an A/F feedback controlprocess (steps S26, S46, S66, S86) described hereinafter.

[0122] Then, the program proceeds to a step S4, wherein the reduction ofthe start-depending correction coefficient KAST determined at the stepS2 is carried out so as to progressively reduce the degree of anincrease in the fuel injection amount to be effected by thestart-dependent correction coefficient KAST as time elapses after theengine 3 has started to be cranked.

[0123] Then, the program proceeds to as a step S5, wherein a basic fuelinjection time period Tist for the start of the engine is calculated.

[0124] Then, the program proceeds to a step S6, wherein atemperature-dependent correction coefficient KTW is determined bysearching a map, not shown, based on the engine temperature TW and theintake pipe absolute pressure PBA.

[0125] Then, the program proceeds to a step S7, wherein an atmosphericpressure-dependent correction coefficient KPA is determined by searchinga table, not shown, based on the atmospheric pressure PA.

[0126] Then, the program proceeds to a step S8, wherein aKPF-calculating process is carried out to determine a fuelpressure-dependent correction coefficient KPF. The fuelpressure-dependent correction coefficient KPF is determined bysearching, a table, not shown, based on a differential pressure ΔPFbetween the fuel pressure PF and in-cylinder pressure PCYL. In thiscase, the in-cylinder pressure PCYL is estimated by searching a table,not shown, with reference to a crank angle position of each cylinder.

[0127] Then, the program proceeds to a step S9, wherein an F/Coperation-determining process is carried out. In this process, it isdetermined whether or not the engine 3 is in an F/C (fuel cutoff)condition based on the engine rotational speed NE and the throttle valveopening TH, and set a flag indicative of the result of thedetermination.

[0128] Then, the program proceeds to a step S10, wherein it isdetermined whether or not the combustion mode transition flag F_CMODassumes 1. The combustion mode transition flag F_CMD is set to 1 whenthe two-stage fuel injection combustion mode is selected as thecombustion mode by a combustion mode transition-determining process(shown in FIG. 27 or FIG. 28), and to 0 when a combustion mode otherthan the two-stage fuel injection combustion mode is selected by thecombustion mode transition-determining process. The engine 3 iscontrolled to enter the two-stage fuel injection combustion mode whenthe combustion mode undergoes transition between the lean combustionmode or the stoichiometric combustion mode and the stratified combustionmode.

[0129] When the answer to this question is negative (NO), i.e. if theengine is in a combustion mode other than the two-stage fuel injectioncombustion mode, the program proceeds to a step S11, wherein it isdetermined whether or not the combustion mode monitor S_EMOD set at thestep S1 assumes 0. If the answer to this question is affirmative (YES),the program proceeds to a step S13, wherein a stoichiometric combustionmode control process, described hereinafter, is carried out, followed byterminating the program.

[0130] On the other hand, if the answer to the question of the step S11is negative (NO), i.e. if the engine is in a combustion mode other thanthe stoichiometric combustion mode, the program proceeds to a step S12,wherein it is determined whether or not the combustion mode monitorS_EMOD set at the step S1 assumes 1. If the answer to this question isaffirmative (YES), i.e. if the engine is in the lean combustion mode,the program proceeds to a step S14, wherein a lean combustion modecontrol process, described hereinafter, is carried out, followed byterminating the program.

[0131] On the other hand, if the answer to the question of the step S12is negative (NO), i.e. if the engine is in the stratified combustionmode, the program proceeds to a step S15, wherein a stratifiedcombustion mode control process, described hereinafter, is carried out,followed by terminating the program.

[0132] Further, if the answer to the question of the step S10 isaffirmative (YES), i.e. if F_CMOD=1 holds, the program proceeds to astep S16, wherein a two-stage fuel injection combustion mode controlprocess is carried out, followed by terminating the program.

[0133] Next, the stoichiometric combustion mode control process executedat the step S13 in FIG. 2 will be described. As shown in the figure, inthis process, first, a Tibase-calculating process is carried out at astep S20 to calculate a basic fuel injection time period Tibase. Detailsof the Tibase-calculating process will be described hereinbelow.

[0134] Next, the program proceeds to a step S21, wherein anLCMD-calculating process is carried out. In this process, the targetvalve lift amount LCMD is calculated, as will be described hereinbelow.

[0135] Next, the program proceeds to a step S22, wherein aKEGR-calculating process is carried out to determine an EGR-dependentcorrection coefficient KEGR. In this process, the EGR-dependentcorrection coefficient KEGR is determined based on the demanded torquedetermined at the step S1, the engine rotational speed NE, the targetvalve lift amount LACT determined at the step S22, the actual valve liftamount LACT detected by the valve lift sensor 26, the intake pipeabsolute pressure PBA, and a map value of the intake pipe absolutepressure PBAm, by searching three maps, not shown. The EGR-dependentcorrection coefficient KEGR compensates for a change in the amount ofintake air caused by a change in the EGR rate.

[0136] Then, the program proceeds to a step S23, wherein aKCMD-calculating process is carried out to calculate a final targetair-fuel ratio coefficient KCMD (target air-fuel ratio). Morespecifically, first, a basic target air-fuel ratio coefficient KBS isdetermined by searching a map, not shown, based on the demanded torquePME determined at the step S1 and the engine rotational speed NE. Then,the basic target air-fuel ratio coefficient KBS is multiplied by thecoolant temperature-dependent correction coefficient KTW determined atthe step S6 to calculate the final target air-fuel ratio coefficientKCMD. The basic target air-fuel ratio coefficient KBS and the finaltarget air-fuel ratio coefficient KCMD are expressed as equivalentratios which are inversely proportional to respective correspondingair-fuel ratios A/F.

[0137] Then, the program proceeds to a step S24, wherein aKTOTAL-calculating process is calculated to calculate a total correctioncoefficient KTOTAL. More specifically, the total correction coefficientKTOTAL is calculated by the following equation (1):

KTOTAL×KAST×KTA×KPA×KEGR×KETC  (1)

[0138] wherein KTA represents an intake air-dependent correctioncoefficient determined by searching a table, not shown, based on theintake air temperature TA, and KETC represents a chargingefficiency-dependent correction coefficient determined by searching atable, not shown, based on the final target air-fuel ratio coefficientKCMD.

[0139] Then, the program proceeds to a step S25, wherein aKOBSV-calculating process is carried out. In this process, a correctioncoefficient KOBSV used at the following step S26 is calculated byestimating an air-fuel ratio on a cylinder-by-cylinder basis by using anobserver.

[0140] Then, the program proceeds to a step S26, wherein the A/Ffeedback control process is carried out. In this process, estimatedair-fuel ratio feedback control is carried out by using the final targetair-fuel ratio coefficient KCMD and the correction coefficient KOBSVcalculated at the respective steps S23, S26.

[0141] Then, the program proceeds to a step S27, wherein aKSTR-calculating process is carried out to calculate a feedbackcorrection coefficient KSTR. In this process, the feedback correctioncoefficient KSTR is determined based on the signal from the LAF sensor27 by using an adaptive controller of self-tuning regulator type, notshown. The feedback correction coefficient KSTR is applied to the basicfuel injection time period Tibase to dynamically compensate for time ittakes for the actual air-fuel ratio to become equal to the targetair-fuel ratio due to delayed response of the fuel injection system ofthe engine, to thereby enhance the convergence of the air-fuel ratiocontrol.

[0142] Then, the program proceeds to a step S28, wherein aDB-compensating process is carried out. In this process, a correctionvalue TiDB is calculated which compensates for a large change in theengine rotational speed NE. The correction value TiDB is calculated as apositive or negative value.

[0143] Then, the program proceeds to a step S29, wherein a process forcalculating a direct ratio Ae and a carry-off ratio Be is carried out.In this process, the direct ratio Ae and the carry-off ratio Be as fuelbehavior parameters are calculated based on the engine rotational speedNE, the intake pipe absolute pressure PBA, and other parametersindicative of operating conditions of the engine.

[0144] Then, the program proceeds to a step S30, wherein aTout-calculating process is carried out to calculate the final fuelinjection time period Tout. More specifically, the basic fuel injectiontime period Tibase calculated as described above is multiplied by thetotal correction coefficient KTOTAL, the final target air-fuel ratiocoefficient KCMD and the feedback correction coefficient KSTR, and thecorrection value TiDB is added to the product of the abovemultiplication to determine a demanded fuel injection time periodTcyl(i) on a cylinder-by-cylinder basis(Tcyl(i)=Tibase×KTOTAL×KCMD×TSTR+TiDB). It should be noted that thesymbol i of the demanded fuel injection time period Tcyl(i) represents acylinder number.

[0145] Next, by using the fuel pressure-dependent correction coefficientKPF, the direct ratio Ae and the carry-off ratio Be determined asdescribed above, the final fuel injection time period Tout(i) iscalculated on a cylinder-by-cylinder basis by the following equation(2):

Tout(i)=((Tcyl(i)−Be×TWP(i)/Ae)×KPF+TiVB  (2)

[0146] The Tout(i) value corresponds to a valve-opening time period overwhich each injector is open for the corresponding cylinder, and thereforrepresents an amount of fuel to be actually injected into the cylinder.In the equation, TiVB represents an ineffective time-correction timedetermined based on the battery voltage, and TWP(i) an attached fuelamount-equivalent value (time) corresponding to an amount of fuelattached to each cylinder. The attached fuel amount-equivalent valueTWP(i) is determined in a TWP(i)-calculating process which is executedby another routine, by using the following equation (3):

TWP(i)n=((Tout(i)−TiVB/KPF)×(1−Ae)+(1−Be)×TWP(i)n−1  (3)

[0147] wherein TWP(i)n and TWP(i)n−1 represent the present value and theimmediately preceding value of the attached fuel amount-equivalent valueTWP(i).

[0148] Next, the program proceeds to a step S31, wherein the fuelinjection timing θinj is calculated by the fuel injectiontiming-calculating process. Details of this process will be describedhereinbelow.

[0149] Then, the program proceeds to a step S32, wherein a purge controlprocess is carried out, followed by terminating the program. In thisprocess, evaporative fuel adsorbed in a canister of a purge system isdelivered to the intake pipe 12, and the purge amount, i.e. the flowrate of the evaporative fuel is controlled.

[0150]FIGS. 5 and 6 show the lean combustion mode control process andthe stratified combustion mode control process executed at therespective steps S14 and S15 in FIG. 2. As shown in the figures, thesteps S40 to S52 and the steps S60 to S72 are the same as the steps S20S32 of the stoichiometric combustion mode control process describedabove, and therefore, detailed description thereof is omitted.

[0151] Further, FIG. 7 shows the two-stage fuel injection combustionmode control process executed at the step S16 in FIG. 2. The steps S80to S92 are the same as the steps S20 to S32 of the stoichiometriccombustion mode control process described above, except for details ofthe KCMD-calculating process executed at a step S83 and therefore,detailed description of the steps other than this is omitted. Thedetails of the KCMD-calculating process at the step S83 will bedescribed hereinbelow.

[0152] Next, the Tibase-calculating process at the steps S20, S40, S60,S80 will be described with reference to FIG. 8. As shown in FIG. 8, inthis process, first, at a step S100, it is determined whether or not aVTEC-permitting flag F_VTEC assumes 1. The VTEC-permitting flag F_VTECis set to 1 when the valve timing is set to HI.VT, whereas the same isset to 0 when the valve timing is set to LO.VT. It should be noted thatin the lean combustion mode, the stratified combustion mode and thetwo-stage fuel injection combustion mode, F_VTEC=0 holds since the valvetiming is set to LO.VT in these modes.

[0153] If the answer to the question of the step S100 is affirmative(YES), i.e. if the valve timing is set to HI.VT, the program proceeds toa step S101, wherein a multiplier term Ati is determined by searching amap, not shown, based on the engine rotational speed NE and the actualcam phase CAIN.

[0154] Next, the program proceeds to a step S102, wherein an addend termBti for HI.VT is determined by searching a map, not shown, based on theengine rotational speed NE and the actual cam phase CAIN.

[0155] Then, the program proceeds to a step S103, wherein the basic fuelinjection time period Tibase for HI.VT is calculated by the followingequation (4):

Tibase=Ati×PBA+Bti  (4)

[0156] followed by terminating the program.

[0157] On the other hand, if the answer to the question of the step S100is negative (NO), i.e. if the valve timing is set to LO.VT, the programproceeds to a step S104, wherein a multiplier term Ati for LO.VT isdetermined in the same manner as at the step S101 by using another map.

[0158] Then, the program proceeds to a step S105, wherein an addend termBti for LO.VT is determined in the same manner as at the step S102 byusing another map.

[0159] Then, the program proceeds to the step S103 wherein the basicfuel injection time period Tibase for LO.VT is calculated by thefollowing equation:

Tibase=Ati×PBA+Bti  (4)

[0160] followed by terminating the program.

[0161] Next, the LCMD-calculating process (steps S21, S41, S61, S81) forcalculating the target valve lift amount LCMD will be described withreference to FIG. 9. As shown in the figure, in this process, first at astep S110, it is determined whether or not an EGR-permitting flag F_EGRassumes 1. The EGR-permitting flag F_EGR is set to 1 when the EGRoperation is being executed by opening the EGR control valve 16 arrangedacross the EGR pipe 15 is opened to, and to 0 when the EGR operation isbeing inhibited by closing the EGR control valve 16.

[0162] If the answer to the question of the step S110 is negative (NO),i.e. if the EGR operation is not being executed, the present program isterminated, whereas if the answer to the question of the same isaffirmative (YES), i.e. if the EGR operation is being executed, theprogram proceeds to a step S111, wherein it is determined whether or notthe combustion mode monitor S_EMOD assumes 0. If the answer to thisquestion is affirmative (YES), i.e. if the engine 3 is in thestoichiometric combustion mode, the program proceeds to a step S112,wherein it is determined whether or not the VTEC-permitting flag F_VTECassumes 1.

[0163] If the answer to this question is affirmative (YES), i.e. if thevalve timing is set to HI.VT, the program proceeds to a step S113,wherein a map value LMAP for the stoichiometric combustion mode andHI.VT is determined by searching a map, not shown, based on the enginerotational speed NE and the demanded torque PME. Then, the programproceeds to a step S114, wherein the map value LMAP determined at thestep S113 is set to the target valve lift amount LCMD, followed byterminating the program.

[0164] On the other hand, if the answer to the question of the step S112is negative (NO), the program proceeds to a step S115, wherein similarlyto the step S113, a map valve LMAP for the stoichiometric combustionmode and LO.VT is determined by searching a map, not shown, based on theengine rotational speed NE and the demanded torque PME. Then, the stepS114 is executed, followed by terminating the program.

[0165] On the other hand, if the answer to the question of the step S111is negative (NO), i.e. if the engine 3 is not in the stoichiometriccombustion mode, the program proceeds to a step S116, wherein it isdetermined whether or not the combustion mode monitor S_EMOD assumes 1.If the answer to this question is affirmative (YES), i.e. if the engineis in the lean combustion mode, the program proceeds to a step S117,wherein a map value LMAP for the lean combustion mode is determined inthe same manner as at the steps S113, S115. Then, the step S114 isexecuted, followed by terminating the program.

[0166] On the other hand, if the answer to the question of the step S116is negative (NO), i.e. if the engine 3 is in the stratified combustionmode, the program proceeds to a step S118, wherein it is determinedwhether or not an idle flag F_IDLE assumes 1. The idle flag F_IDLE isset to 1 when the engine 3 is idling, and set to 0 when the engine 3 isnot idling.

[0167] If the answer to this question is affirmative (YES), i.e. if theengine is idling, the program proceeds to a step S119, wherein the mapvalue LMAP for stratified combustion and idling is determined in thesame manner as at the step S113. Then, the step S114 is executed,followed by terminating the program.

[0168] If the answer to the question of the step S118 is negative (NO),i.e. if the engine is not idling, the program proceeds to a step S120,wherein the map value LMAP for stratified combustion and no idling isdetermined in the same manner as at the step S113. Then, the step S114is executed, followed by terminating the program. It should be notedthat in the LCMD-calculating process at the step S81 in the two-stagefuel injection combustion mode, the target valve lift amount LCMD isdetermined in dependence on values of the flags F_EGR, F_VTEC, F_IDLEand the combustion mode monitor S_EMOD assumed before transition to thetwo-stage fuel injection combustion mode.

[0169] Next, the fuel injection timing-calculating process executed ineach of the combustion control processes (steps S31, S51, S71, S91)described hereinabove will be described with reference to FIGS. 10 to15. In this process, as described hereinafter, the injection terminationtiming and the injection start timing of the fuel injection timing θinjfor each combustion mode are calculated on a cylinder-by-cylinder basis.As shown in FIG. 10, first, at a step s130, it is determined whether ornot the combustion mode transition flag F_CMOD assumes 0. If the answerto this question is affirmative (YES), i.e. if F_CMOD=0 holds, whichmeans that the engine is not in the two-stage fuel injection combustionmode, the program proceeds to a step S131, wherein it is determinedwhether or not the combustion mode monitor S_EMOD assumes 0.

[0170] If the answer to the question is affirmative (YES), i.e. ifS_EMOD=0 holds, which means that the engine 3 is in the stoichiometriccombustion mode, the program proceeds to a step S132, wherein aninjection termination timing-calculating process for the stoichiometriccombustion mode is executed. In this process, an injection terminationtiming IJLOGH (injection timing for the homogeneous combustion mode) iscalculated.

[0171] Then, the program proceeds to a step S133, wherein an injectionstart timing-calculating process for the homogeneous combustion mode iscarried out, followed by terminating the program. In this process, aninjection start timing for the stoichiometric combustion mode iscalculated back from the injection termination timing IJLOGH calculatedat the step S132, by using the final fuel injection time period Toutcalculated at the step S30. The injection start timing and the injectiontermination timing IJLOGH are calculated as respective crank anglepositions with reference to the TDC position in the intake stroke.

[0172] On the other hand, if the answer to the question of the step S131is negative (NO), i.e. if the engine 3 is not in the stoichiometriccombustion mode, the program proceeds to a step S134, wherein it isdetermined whether or not the combustion mode monitor S_EMOD assumes 1.If the answer to the question is affirmative (YES), i.e. if the engine 3is in the lean combustion mode, the program proceeds to a step S135,wherein an injection termination timing-calculating process for the leancombustion mode, described in detail hereinafter, is carried out tocalculate an injection termination timing IJLOGH for the lean combustionmode (fuel injection timing for the lean combustion mode).

[0173] Then, the program proceeds to the step S133, wherein theinjection start timing for the lean combustion mode is calculated basedon the injection termination timing IJLOGH and the final fuel injectiontime period Tout calculated at the respective steps S135 and S50,followed by terminating the program. The injection start timing and theinjection termination timing IJLOGH for the lean combustion mode areboth calculated as respective crank angle positions with reference tothe TDC position in the intake stroke, similarly to those for thestoichiometric combustion mode described above.

[0174] On the other hand, if the answer to the question of the step S134is negative (NO), i.e. if the engine 3 is in the stratified combustionmode, the program proceeds to a step S136, wherein an injectiontermination timing-calculating process for the stratified combustionmode is carried out to calculate an injection termination timing IJLOGDfor the stratified combustion mode (fuel injection timing for thestratified combustion mode).

[0175] Then, the program proceeds to a step S137, wherein, similarly tothe step S133, the injection start timing for the stratified combustionmode is calculated based on the injection termination timing IJLOGD andthe final fuel injection time period Tout calculated at the respectivesteps S136 and S70, followed by terminating the program. The injectionstart timing and the injection termination timing IJLOGD are bothcalculated as respective crank angle positions with reference to the TDCposition in the compression stroke, differently from those for thestoichiometric combustion mode and the lean combustion mode.

[0176] On the other hand, if the answer to the question of the step S130is negative (NO), i.e. if the engine 3 is in the two-stage fuelinjection combustion mode, the program proceeds to a step S138, whereinan NE-ToutdbD table, an example of which is shown in FIG. 11, issearched based on the engine rotational speed NE, to determine acompression-stroke injection time period ToutdbD.

[0177] The compression-stroke injection time period ToutdbD is aninjection time period (second injection time period) in the compressionstroke, which is one of the injection time periods of the respective twoinjections in the two-stage fuel injection combustion mode, and thereason for determining the time period ToutdbD as described above is asfollows: In the two-stage fuel injection combustion mode, in which fuelis injected two times, i.e. during the intake stroke and during thecompression stroke, it is preferred that to ensure stability ofcombustion, as much fuel as possible is injected in the intake strokeand at the same time, to ensure excellent fuel economy and exhaustemissions, the amount of fuel injected in the compression stroke islimited to as small an amount as possible (minimum fuel injectionamount) in which injected fuel can be ignited. Further, the minimum fuelinjection amount in which injected fuel can be ignited during thecompression stroke changes as the state of flow of air within thecylinder changes with the engine rotational speed NE, and therefore, itis required to compensate for an amount of this change in the minimumfuel injection amount. Therefore, as described above, thecompression-stroke fuel injection time period ToutdbD is determinedindependence on the engine rotational speed NE, whereby it is possibleto ensure stability of combustion. Further, the NE-ToutdbD table isconfigured such that as the engine rotational speed NE is higher, thecompression-stroke injection time period ToutdbD becomes smaller. Thisis because as the engine rotational speed NE is higher, the mixturebecomes easier to ignite owing to a favorable flow of the mixture withinthe cylinder, which allows reduction of the minimum fuel injectionamount in which injected fuel can be ignited.

[0178] Next, the program proceeds to a step S139, wherein it isdetermined whether or not the final fuel injection time period Toutcalculated at the step S90 is longer than the sum of thecompression-stroke injection time period ToutdbD and a predeterminedtime period X_Toutdb. If the answer to this question is negative (NO),i.e. if Tout≦ToutdbD+X_Toutdb holds, the steps S136, S137 are executed,followed by terminating the program. That is, even when the engine 3 isset to the two-stage fuel injection combustion mode, if the fuelinjection amount is small, the fuel is not injected two times per cycleof engine operation, but similarly to the stratified combustion mode,only the fuel injection during the compression stroke alone isperformed. This is because the final fuel injection time period Tout isso short that only the minimum fuel injection amount in which injectedfuel can be ignited during the compression stroke can be secured, whichmakes it difficult to perform fuel injection during the intake stroke.

[0179] On the other hand, if the answer to the question of the step S139is affirmative (YES), i.e. if Tout>ToutdbD+X_Toutdb holds, the programproceeds to a step S140, wherein two injection termination timingsIJLOGH, IJLOGD (during the intake stroke and during the compressionstroke) for the two-stage fuel injection combustion mode are calculatedin an injection termination timing-calculating process for the two-stagefuel injection combustion mode by using the final fuel injection timeperiod Tout and the compression-stroke injection time ToutdbD calculatedat the respective steps S90 and S138.

[0180] Then, the program proceeds to a step S141, wherein two injectionstart timings for the two-stage fuel injection combustion mode arecalculated based on an injection termination timing IJLOGH for afirst-stage injection (during the intake stroke) and a fuel injectiontime period ToutH for the first-stage injection, referred tohereinafter, and an injection termination timing IJLOGD for asecond-stage injection (during the compression stroke) and a fuelinjection time period ToutD for the second-stage injection, referred tohereinafter, followed by terminating the program.

[0181] Next, the injection termination timing-calculating process forthe stoichiometric combustion mode, which is executed at the step S132in FIG. 10, will be described with reference to FIG. 12. In the process,as described below, the injection termination timing IJLOGH for thestoichiometric combustion mode is calculated.

[0182] In the process, first, at a step S150, a coolanttemperature-dependent correction term IJTW (preset fuel injection timingfor homogeneous combustion) is determined. More specifically, thecoolant temperature-dependent correction term IJTW is determined bysearching a TW-IJTW table an example of which is shown in FIG. 13, basedon the engine coolant temperature TW. As shown in the figure, in theTW-IJTW table, the coolant temperature-dependent correction term IJTW isset to a smaller value as the engine coolant temperature TW is higher.The correction term IJTW is thus set so as to generate torqueefficiently by advancing the injection termination timing IJLOGH of thefuel injection timing θinj since fuel injected into the combustionchamber 3 c is easier to ignite as the engine coolant temperature TW ishigher and hence homogeneous combustion is carried out more efficiently.

[0183] Then, at a step S151, it is determined whether or not theVTEC-permitting flag F_VTEC assumes 1. If the answer to the question isaffirmative (YES), i.e. if the valve timing is set to HI.VT, the programproceeds to a step S152, wherein it is determined whether or not theEGR-permitting flag F_EGR assumes 1.

[0184] If the answer to the question is affirmative (YES), i.e. if theEGR operation is being executed, the program proceeds to a step S153,wherein a basic injection termination timing INJMAPF (preset fuelinjection timing for homogeneous combustion) for HI.VT and EGR operationis determined by searching a map, not shown, based on the enginerotational speed NE and the final fuel injection time period Toutobtained at the step S30.

[0185] Then, the program proceeds to a step S155, wherein the injectiontermination timing IJLOGH is set to a value obtained by adding thecoolant temperature-dependent correction term IJTW calculated at thestep S150 to the basic injection termination timing INJMAPF, followed byterminating the program.

[0186] On the other hand, if the answer to the question of the step S152is negative (NO), i.e. if the EGR operation is not being executed, theprogram proceeds to a step S154, wherein a basic injection terminationtiming INJMAPF for HI.VT and non-EGR operation is determined, in thesame manner as at the step S153. Then, at the step S155, an injectiontermination timing IJLOGH for HI.VT and non-EGR operation is calculated,followed by terminating the program.

[0187] If the answer to the question of the step S151 is negative (NO),i.e. if the valve timing is set to LO.VT, the program proceeds to a stepS156, wherein it is determined whether or not the EGR-permitting flagF_EGR assumes 1.

[0188] If the answer to this question is affirmative (YES), i.e. if theEGR operation is being carried out, the program proceeds to a step S157,wherein in the same manner as at the step S153, a basic injectiontermination timing INJMAPF for LO.VT and EGR operation is determined.Then, at the step S155, an injection termination timing IJLOGH for LO.VTand EGR operation is calculated, followed by terminating the program.

[0189] On the other hand, if the answer to the question of the step S156is negative (NO), i.e. if the EGR operation is not being carried out,the program proceeds to a step S158, wherein in the same manner as atthe step S153, a basic injection termination timing INJMAPF for LO.VTand non-EGR operation is determined. Then, the program proceeds to thestep S155, wherein an injection termination timing IJLOGH for LO.VT andnon-EGR operation is calculated, followed by terminating the presentprogram.

[0190] Next, the injection termination timing-calculating process forthe lean combustion mode, which is executed at the step S135 in FIG. 10,will be described with reference to FIG. 14. In this process, first, ata step S160, similarly to the step S150, the coolanttemperature-dependent correction term IJTW is determined by searchingthe FIG. 13 TW-IJTW table based on the engine coolant temperature TW.

[0191] Then, the program proceeds to a step S161, wherein it isdetermined whether or not the EGR-permitting flag F_EGR assumes 1. Ifthe answer to the question is affirmative (YES), i.e. if the EGRoperation is being carried out, the program proceeds to a step S162,wherein a basic injection termination timing INJMAPF for EGR operationis determined by searching a map, not shown, based on the enginerotational speed NE and the final fuel injection time period Toutdetermined at the step S50.

[0192] Then, the program proceeds to a step S163, and the injectiontermination timing IJLOGH is set to a value obtained by adding thecoolant temperature-dependent correction term IJTW calculated at thestep S160 to the basic injection termination timing INJMAPF, followed byterminating the program.

[0193] On the other hand, if the answer to the question of the step S161is negative (NO), i.e. if the EGR operation is not being carried out,the program proceeds to a step S164, wherein a basic injectiontermination timing INJMAPF for non-EGR operation is determined, in thesame manner as at the step S162. Then, at the step S163, an injectiontermination timing IJLOGH for non-EGR operation is calculated, followedby terminating the program.

[0194] Next, the injection termination timing-calculating process forthe stratified combustion mode, which is executed at the step S136 inFIG. 10, will be described with reference to FIG. 15. In this process,differently from the injection termination timing for the stoichiometriccombustion mode and the lean combustion mode, the injection terminationtiming IJLOGD is calculated as a crank angle position after TDC of thecompression stroke.

[0195] In the process, first, it is determined at a step S170 whether ornot the EGR-permitting flag F_EGR assumes 1. If the answer to thequestion is affirmative (YES), i.e. if the EGR operation is beingcarried out, the program proceeds to a step S171, wherein a basicinjection termination timing INJMAPF (preset fuel injection timing forthe stratified combustion mode) for EGR operation is determined based onthe engine rotational speed NE and the final fuel injection time periodTout determined at the step S70.

[0196] Then, the program proceeds to a step S172, wherein the basicinjection termination timing INJMAPF is set to the injection terminationtiming IJLOGD for EGR operation, followed by terminating the program.

[0197] On the other hand, if the answer to the question of the step S170is negative (NO), i.e. if the EGR operation is not being carried out,the program proceeds to a step S173, wherein a basic injectiontermination timing INJMAPF for non-EGR operation is determined, in thesame manner as at the step S171. Then, at the step S172, the basicinjection termination timing INJMAPF is set to an injection terminationtiming IJLOGD for non-EGR operation, followed by terminating theprogram.

[0198] Next, the injection termination timing-calculating process forthe two-stage fuel injection combustion mode executed at the step S140in FIG. 10 will be described with reference to FIG. 16. In this process,as will be described in detail hereinafter, the two injectiontermination timings IJLOGH, IJLOGD of the fuel injection timing θinj forthe two-stage fuel injection combustion mode are calculated. In thiscase, the first-stage injection termination timing IJLOGH is calculatedas a crank angle position after TDC in the intake stroke, and thesecond-stage injection termination timing IJLOGD is calculated as acrank angle position after TDC in the compression stroke.

[0199] In this process, first, at a step S180, similarly to the stepsS150, S160, the coolant temperature-dependent correction coefficientIJTW is determined by searching the TW-IJTW table.

[0200] Then, the program proceeds to a step S181, wherein a valueobtained by subtracting the compression-stroke injection time periodToutdbD determined at the step S138 from the final fuel injection timeperiod Tout for the two-stage fuel injection combustion mode determinedat the step S90 is set to the first-stage injection time period ToutH(fuel injection time period during the intake stroke for the two-stagefuel injection combustion mode).

[0201] Then, the program proceeds to a step S182, wherein thecompression-stroke injection time period ToutdbD is set to thesecond-stage injection time period ToutD (injection time period duringthe compression stroke for the two-stage fuel injection combustionmode).

[0202] Next, the program proceeds to a step S183, wherein it isdetermined whether or not the immediately preceding value S_EMODn-1 ofthe combustion mode monitor assumes 0. If the answer to this question isaffirmative (YES), i.e. if the combustion mode before transition to thetwo-stage fuel injection combustion mode is the stoichiometriccombustion mode, similarly to the step S156 to S158 of the injectiontermination timing-calculating process for the stoichiometric combustionmode, the following steps S184 to S186 are executed.

[0203] More specifically, if the answer to the question of the step S184is affirmative (YES), i.e. if the EGR operation is being executed, theprogram proceeds to a step S185, wherein the map used at the step S157is searched based on the engine rotational speed NE and the first-stageinjection time period ToutH determined at the step S181 to determine abasic injection termination timing INJMAPF for the stoichiometriccombustion mode and EGR operation.

[0204] On the other hand, if the answer to the question of the step S184is negative (NO), i.e. if the EGR operation is not being executed, theprogram proceeds to a step S186, wherein in the same manner as at thestep S185, a basic injection termination timing INJMAPF for thestoichiometric combustion mode and non-EGR operation is determined byusing the map used at the step S158.

[0205] On the other hand, if the answer to the question of the step S183is negative (NO), i.e. if the combustion mode before transition to thetwo-stage fuel injection combustion mode is not the stoichiometriccombustion mode, the following steps S187 to S189 are executed similarlyto the steps S161, S162, S164 of the injection terminationtiming-calculating process for the lean combustion mode.

[0206] More specifically, if the answer to the question of the step S187is affirmative (YES), i.e. if the EGR operation is being executed, theprogram proceeds to a step S188, wherein in the same manner as at thestep S185, a basic injection termination timing INJMAPF for the leancombustion mode and EGR operation is determined by using the map used atthe step S162.

[0207] On the other hand, if the answer to the question of the step S187is negative (NO), i.e. if the EGR operation is not being executed, theprogram proceeds to a step S189, wherein in the same manner as at thestep S185, an injection termination timing INJMAPF for the leancombustion mode and non-EGR operation is determined by using the mapused at the step S164.

[0208] Following any of the steps S185, S186, S188, and S189, theprogram proceeds to a step S190, wherein a value obtained by adding thetemperature-dependent correction term IJTW to the basic injectiontermination timing INJMAPF is set to the first-stage injectiontermination timing IJLOGH.

[0209] Next, the following steps S191 to S194 are carried out similarlyto the steps S170 to S173 of the injection terminationtiming-calculating process for the stratified combustion mode. Morespecifically, it is determined at a step S191 whether or not F_EGRassumes 1. If the answer to this question is affirmative (YES), i.e. ifthe EGR operation is being executed, the program proceeds to a stepS192, wherein a basic injection termination timing INJMAPF for thestratified combustion mode and EGR operation is determined by searchingthe map used at the step S171 based on the engine rotational speed NEand the second-stage injection time period ToutD determined at the stepS182. Then, the program proceeds to a step S193, wherein the basicinjection termination timing INJMAPF for the stratified combustion modeand EGR operation is set to the second-stage injection terminationtiming IJLOGD, followed by terminating the program.

[0210] On the other hand, if the answer to the question of the step S191is negative (NO), i.e. if the EGR operation is not being executed, theprogram proceeds to a step S194, wherein in the same manner as at thestep S192, a basic injection termination timing INJMAPF for thestratified combustion mode and non-EGR operation is determined bysearching the map used at the step S173, and then the program proceedsto the step S193, wherein the basic injection termination timing INJMAPFis set to the second-stage injection termination timing IJLOGD, followedby terminating the program.

[0211] As described above, at the steps S180 to S193, the injectiontermination timing in the intake stroke for the two-stage fuel injectioncombustion mode is set to the injection termination timing IJLOGH forthe homogeneous combustion mode retrieved from the map for thehomogeneous combustion mode, while the injection termination timing inthe compression stroke for the same mode is set to the injectiontermination timing IJLOGD for the stratified combustion mode retrievedfrom the map for the stratified combustion mode. Therefore, it is notnecessary to provide a map additionally to the maps for the homogeneouscombustion mode and the stratified combustion mode, whereby the numberof ROMs 2 c or the capacity of the ROM 2 c can be decreased.

[0212] Next, the KCMD-calculating process at the step S83 of the FIG. 7two-stage fuel injection combustion mode control process will bedescribed with reference to FIG. 17. First, at a step S200, it isdetermined whether or not the immediately preceding value S_EMODn-1 ofthe combustion mode monitor assumes 0. If the answer to this question isaffirmative (YES), i.e. if the combustion mode before transition to thetwo-stage fuel injection combustion mode is the stoichiometriccombustion mode, the program proceeds to a step S201, wherein it isdetermined whether or not the immediately preceding value of the finaltarget air-fuel ratio coefficient KCMD stored in the RAM 2 b is equal toor higher than a predetermined value KBSST. The predetermined valueKBSST is set to a value of the final target air-fuel ratio coefficientKCMD corresponding to the stoichiometric air-fuel ratio.

[0213] If the answer to this question is negative (NO), i.e. if theimmediately preceding value of the final target air-fuel ratiocoefficient KCMD is on a lean side with respect to the stoichiometricair-fuel ratio, the program proceeds to a step S202, wherein it isdetermined whether or not a flag F_PRISM assumes 1. The flag F_PRISMindicates whether or not the optimum A/F control responsive to thesignal from the O2 sensor (hereinafter referred to as “the O2·A/Fcontrol”) is being executed, and set to 1 when the O2·A/F control isbeing executed and to 0 when the same is not being executed.

[0214] If the answer to this question is affirmative (YES), i.e. if theO2·A/F control is being executed, the program proceeds to a step S203,wherein a KCMD-calculating process for the O2·A/F control is carried outto calculate the final target air-fuel ratio coefficient KCMD, followedby terminating the program.

[0215] On the other hand, if the answer to the question of the step S202is negative (NO), i.e. if the O2·A/F control is not being executed, theprogram is immediately terminated without updating the immediatelypreceding value of the final target air-fuel ratio coefficient KCMDstored in the RAM 2 b.

[0216] On the other hand, if the answer to the question of the step S201is affirmative (YES), i.e. if the immediately preceding value of thefinal target air-fuel ratio coefficient KCMD is on a rich side withrespect to the stoichiometric air-fuel ratio, the program is alsoimmediately terminated without updating this value.

[0217] On the other hand, if the answer to the question of the step S200is negative (NO), i.e. if the combustion mode before transition to thetwo-stage fuel injection combustion mode is not the stoichiometriccombustion mode, the program process to a step S204, wherein it isdetermined whether or not the immediately preceding value S_EMODn-1 ofthe combustion mode monitor assumes 1. If the answer to this question isaffirmative (YES), i.e. if the combustion mode before transition to thetwo-stage fuel injection combustion mode is the lean combustion mode,the program proceeds to a step S205, wherein it is determined whether ornot the EGR-permitting flag F_EGR assumes 1.

[0218] If the answer to this question is affirmative (YES), i.e. if theEGR operation is being executed, the program proceeds to a step S206,wherein a basic target air-fuel ratio coefficient KBS for the leancombustion mode and EGR operation is determined by searching a map, notshown, based on the demanded torque PME determined at the step S1 andthe engine rotational speed NE.

[0219] Then, the program proceeds to a step S208, wherein a valueobtained by multiplying the basic target air-fuel ratio coefficient KBSby the coolant temperature-dependent correction coefficient KTWdetermined at the step 6 is set to the final target air-fuel ratiocoefficient KCMD, followed by terminating the program.

[0220] On the other hand, if the answer to the question of the step S205is negative (NO), i.e. if the EGR operation is not being executed, theprogram proceeds to a step S207, wherein in the same manner as at thestep S206, a basic target air-fuel ratio coefficient KBS for the leancombustion mode and non-EGR operation is determined. Next, the programproceeds to the step S208, wherein the final target air-fuel ratiocoefficient KCMD is calculated, followed by terminating the program.

[0221] On the other hand, if the answer to the question of the step S204is negative (NO), i.e. if the combustion mode before transition to thetwo-stage fuel injection combustion mode is the stratified combustionmode, similarly to the steps S205 to S206, steps S209 to S211 arecarried out. More specifically, if the EGR operation is being executed,in the same manner as at the step S206, a basic target air-fuel ratiocoefficient KBS for the stratified combustion mode and EGR operation isdetermined at steps S209, S210, and then the above step S208 isexecuted, followed by terminating the program. On the other hand, if theEGR operation is not being executed, in the same manner as at the stepS206, a basic target air-fuel ratio coefficient KBS for the stratifiedcombustion mode and non-EGR operation is determined (steps S209, S211),and then the step S208 is executed, followed by terminating the program.

[0222] Hereafter, the ignition timing control process will be describedwith reference to FIGS. 18 to 26. FIG. 18 shows a main routine for thisprocess, which is executed whenever the TDC signal is received, in amanner following the fuel injection control process described above.

[0223] Referring to FIG. 18, first, at a step S220, an IGMAP-calculatingprocess, described hereinafter, is carried out to determine a map valueIGMAP for injection timing IG. Then, the program proceeds to a stepS221, wherein the map value IGMAP determined at the step S220 is set toa basic injection timing IGBASi.

[0224] Then, the program proceeds to a step S222, wherein a correctionterm-calculating process is carried out to calculate correction terms,referred to hereinafter. Then, the program proceeds to a step S223,wherein a total correction term IGCR is calculated by applying thecorrection terms determined at the step S222 to the following equation(5):

IGCR=IGTW+IGIDL−IGTA−IGACCR+IGWOT−IGTWR−IGATR  (5)

[0225] Next, the program proceeds to a step S224, wherein a finalinjection timing IGABi is calculated by applying a value IGLOG obtainedby adding the total correction term IGCR to the basic injection timingIGBASi, to the following equation (6):

IGABi=IGLOG+IGADJ=(IGBASi+IGCR)+IGADJ  (6)

[0226] followed by terminating the program. A drive signal based on thefinal injection timing IGABi is delivered to the spark plug 5 as asignal indicative of the ignition timing IG. In the above equation (6),IGADJ represents a correction term for correcting errors in the detectedvalues of the rotational angles of the crankshaft 3 e and the camshaft 6i.e. deviations from the proper values thereof, and correcting delay ofsignals from various sensors, and is calculated as a positive ornegative value.

[0227] Hereafter, the IGMAP-calculating process executed at the stepS220 in FIG. 18 will be described with reference to FIG. 19. First, at astep S230, it is determined whether or not the combustion modetransition flag F_CMOD assumes 1. If the answer to this question isnegative (NO), i.e. if the engine 3 is not in the two-stage fuelinjection combustion mode, the program proceeds to a step S231, whereinit is determined whether or not the combustion mode monitor S_EMODassumes 1.

[0228] If the answer to this question is affirmative (YES), i.e. ifS_EMOD=0 holds, which means that the engine 3 is in the stoichiometriccombustion mode, the program proceeds to a step S232, wherein anIGMAPm-retrieving process for the stoichiometric combustion mode iscarried out to determine a basic map value IGMAPm for the stoichiometriccombustion mode.

[0229] On the other hand, if the answer to the question of the step S231is negative (NO), i.e. if the engine 3 is not in the stoichiometriccombustion mode, the program proceeds to a step S233, wherein it isdetermined whether or not the combustion mode monitor S_EMOD assumes 1.If the answer to this question is affirmative (YES), i.e. if the engine3 is in the lean combustion mode, the program proceeds to a step S234,wherein an IGMAPm-retrieving process for the lean combustion mode,described hereinafter, is carried out to determine a basic map valueIGMAPm for the lean combustion mode.

[0230] On the other hand, if the answer to the question of the step S233is negative (NO), i.e. if S_EMOD=2 holds, which means that the engine 3is in the stratified combustion mode, the program proceeds to a stepS235, wherein an IGMAPm-retrieving process for the stratified combustionmode is carried out to determine a basic map value IGMAPm for thestratified combustion mode.

[0231] Following any of IGMAPm-retrieving processes at the above stepsS232, S234, and S235, the program proceeds to a step S236, wherein atable, not shown, is searched based on the EGR-dependent correctioncoefficient KEGR (KEGR determined at any of the steps S22, S42, and S62)for the corresponding combustion mode to determine a KEGR-dependentcorrection term IGKEGR.

[0232] Then, the program proceeds to a step S237, wherein a table, notshown, is searched based on the actual cam phase CAIN, to determine aVTC-dependent correction term IGVTC.

[0233] Next, the program proceeds to the step S238, wherein theKEGR-dependent correction term IGKEGR and the VTC-dependent correctionterm IGVTC are added to the basic map value IGMAPm determined at any ofthe steps S232, S234, and S235 to thereby determine the map value IGMAP,followed by terminating the program.

[0234] On the other hand, if the answer to the question of the step S230is affirmative (YES), i.e. if the engine 3 is in the two-stage fuelinjection combustion mode, the program proceeds to a step S239, whereina map, not shown, is searched based on the engine rotational speed NEand the second-stage injection termination timing IJLOGD (injectiontermination timing for the stratified combustion mode) determined at thestep S193 to determine the basic map value IGMAPm.

[0235] Then, the program proceeds to a step S240, wherein the basic mapvalue IGMAPm is set to the map value IGMAP, followed by terminating theprogram. Thus, in the two-stage fuel injection combustion mode, the mapvalue IGMAP is determined based on the engine rotational speed NE andthe injection termination timing IJLOGD, i.e. the fuel injection timingθinj, for the stratified combustion mode. In this case, as describedhereinbefore, the engine rotational speed NE has a significant influenceon the stability of combustion in the two-stage fuel injectioncombustion mode, and at the same time, the fuel injection timing θinjfor stratified combustion mode is set to the fuel injection timingduring the compression stroke in the two-stage fuel injection combustionmode. The fuel injected this time is involved in the ignition in thetwo-stage fuel injection combustion mode. Therefore, by setting the mapvalue IGMAP to such a value as will enable the stable ignition in thetwo-stage fuel injection combustion mode, it is possible to ensure thestable combustion of the engine.

[0236] Next, the IGMAPm-retrieving process for the stoichiometriccombustion mode executed at the step S232 in FIG. 19 will be describedwith reference to FIG. 20. In this process, the basic map value IGMAPmis determined. First, at a step S250, it is determined whether or notthe VTEC-permitting flag F_VTEC assumes 1. If the answer to thisquestion is affirmative (YES), i.e. if the valve timing is set to HI.VT,the program proceeds to a step S251, wherein it is determined whether ornot the EGR-permitting flag F_EGR assumes 1.

[0237] If the answer to this question is affirmative (YES), i.e. if theEGR operation is being executed, the program proceeds to a step S252,wherein a map, not shown, is searched based on the engine rotationalspeed NE and the demanded torque PME determined at the step S1 todetermine a basic map value IGMAPm for HI.VT and EGR operation, followedby terminating the program.

[0238] On the other hand, if the answer to the question of the step S251is negative (NO), i.e. if the EGR operation is not being executed, theprogram proceeds to a step S253, wherein in the same manner as at thestep S252, a basic map value IGMAPm for HI.VT and non-EGR operation isdetermined, followed by terminating the program.

[0239] On the other hand, if the answer to the question of the step S250is negative (NO), i.e. if the valve timing is set to LO.VT, the programproceeds to a step S254, wherein it is determined whether or not theidle flag F_IDLE assumes 1.

[0240] If the answer to this question is affirmative (YES), i.e. if theengine 3 is idling, the program proceeds to a step S255, wherein atable, not shown, is searched based on a target idle rotational speedNOBJ to determine a map value IGIDLn for idle operation. Then, theprogram proceeds to a step s256, wherein the map value IGIDLn for idleoperation is set to the basic map value IGMAPm, followed by terminatingthe program.

[0241] On the other hand, if the answer to the question of the step S254is negative (NO), i.e. if the engine 3 is not idling, the programproceeds to a step S257, wherein it is determined whether or not theEGR-permitting flag F_EGR assumes 1.

[0242] If the answer to this question is affirmative (YES), i.e. if theEGR operation is being executed, the program proceeds to a step S258,wherein in the same manner as at the step S252, a basic map value IGMAPmfor LO.VT and EGR operation is determined, followed by terminating theprogram.

[0243] On the other hand, if the answer to the question of the step S257is negative (NO), i.e. if the EGR operation is not being carried out,the program proceeds to a step S259, wherein in the same manner as atthe step S252, a basic map value IGMAPm for LO.VT and non-EGR operationis determined, followed by terminating the program.

[0244] Next, the IGMAPm-retrieving process for the lean combustion modeexecuted at the step S234 in FIG. 19 will be described with reference toFIG. 21. First, at a step S260, it is determined whether or not theEGR-permitting flag F_EGR assumes 1.

[0245] If the answer to this question is affirmative (YES), i.e. if theEGR operation is not being carried out, the program proceeds to a stepS261, wherein a map, not shown, is searched based on the enginerotational speed NE and the demanded torque determined at the step S1,to determine a basic map value IGMAPm for EGR operation, followed byterminating the program.

[0246] On the other hand, if the answer to the question of the step S260is negative (NO), i.e. if the EGR operation is not being carried out,the program proceeds to a step S262, wherein in the same manner as atthe step S261, a basic map value IGMAPm for non-EGR operation isdetermined, followed by terminating the present program.

[0247] Next, the IGMAPm-retrieving process for the stratified combustionmode at the step S235 in FIG. 19 will be described with reference toFIG. 22. First, at the step S270, it is determined whether or not theEGR-permitting flag F_EGR assumes 1.

[0248] If the answer to this question is affirmative (YES), i.e. if theEGR operation is being carried out, the program proceeds to a step S271,wherein it is determined whether or not the idle flag F_IDLE assumes 1.

[0249] If the answer to this question is affirmative (YES), i.e. if theengine 3 is idling, the program proceeds to a step S272, wherein a map,not shown, is searched based on the injection termination timing IJLOGDduring the compression stroke determined at the step S172 or at the stepS193 and the engine rotational speed NE, to determine a map value IGIDLnfor idle operation. Then, the program proceeds to a step S273, whereinthe map value IGIDLn for idle operation is set to the basic map valueIGMAPm, followed by terminating the program.

[0250] On the other hand, if the answer to the question of the step S271is negative (NO), i.e. if the engine 3 is not idling, the programproceeds to a step S274, wherein a map, not shown, is searched based onthe injection termination timing IJLOGD during the compression strokedetermined at the step S172 or at the step 193 and the engine rotationalspeed NE, to determine a basic map value IGMAPm for EGR operation,followed by terminating the program.

[0251] On the other hand, if the answer to the question of the step S270is negative (NO), i.e. if the EGR operation is not being carried out,the program proceeds to a step S275, wherein in the same manner as atthe step S274, a basic map value IGMAPm for non-EGR operation isdetermined based on the injection termination timing IJLOGD during thecompression stroke determined at the step S172 or the step S193 and theengine rotational speed NE, followed by terminating the program.

[0252] Next, the correction term-calculating process executed at thestep S222 in FIG. 18 will be described with reference to FIG. 23. Asshown in the figure, first, at a step S280, an IGTW-calculating processis carried out. More specifically, a table, not shown, is searched basedon the engine coolant temperature TW, to determine a low coolanttemperature-dependent correction term IGTW.

[0253] Next, the program proceeds to a step S281, wherein anIGIDL-calculating process is carried out. In this process, a table, notshown, is searched based on the engine rotational speed NE during idleoperation, to determine an idle rotation-dependent correction termIGIDL.

[0254] Then, the program proceeds to a step S282, wherein anIGTA-calculating process is carried out. More specifically, a table, notshown, is searched based on the intake air temperature TA to determinean intake air temperature-dependent correction term IGTA.

[0255] Then, the program proceeds to a step S283, wherein anIGACCR-calculating process is carried out. More specifically, a table,not shown, is searched based on a vehicle acceleration ACCR to determinean acceleration-dependent correction term IGACCR.

[0256] Next, the program proceeds to a step S284, wherein anIGWOT-calculating process is carried out. More specifically, a table,not shown, is searched in dependence on whether the throttle valveopening TH detected by the throttle valve opening sensor 32 is fullyopen, to determine a full open throttle-dependent correction term IGWOT.

[0257] Then, the program proceeds to a step S285, wherein anIGTWR-calculating process is carried out. Details of the this processwill be described hereinafter.

[0258] Next, the program proceeds to a step S286, wherein anIGATR-calculating process is carried out, followed by terminating thepresent program. In this process, a table, not shown, is searched basedon a gear stage NGAR of the automatic transmission detected by the gearstage sensor 31 to determine an AT shift-dependent correction termIGATR.

[0259] Next, the IGTWR-calculating process executed at the step S285 inFIG. 23 will be described with reference to FIG. 24. As shown in thefigure, in this process, first at a step S290, it is determined whetheror not S_EMOD≠2 holds. If the answer to this question is affirmative(YES), i.e. if the engine 3 is not in the stratified combustion mode,the program proceeds to a step S291, wherein a TW-IGTWR table an exampleof which is shown in FIG. 25 is searched based on the engine coolanttemperature TW to calculate a high engine coolant temperature-dependentcorrection term IGTWR, followed by terminating the present program.

[0260] In the TW-IGTWR table, a curve in the solid line indicates tablevalues of the high coolant temperature-dependent correction term IGTWR,and the table is configured such that the table value increases as theengine coolant temperature TW is higher, for the following reason: Asshown in the equation (5) used at the step S223, the high coolanttemperature-dependent correction term IGTWR is a subtrahend term, andhence as this value is larger, the final ignition timing IGABi, i.e. theignition timing IG is retarded. On the other hand, in the homogeneouscombustion, in general, as the engine coolant temperature TW is higher,the combustion temperature becomes higher, which causes the knocking tomore readily occur. Therefore, the ignition timing IG is retarded to alarger degree by setting the high coolant temperature-dependentcorrection term IGTWR to a larger value as the engine coolanttemperature TW is higher, thereby enabling prevention of knocking.

[0261] On the other hand, if the answer to the question of the step S290is negative (NO), i.e. if the engine 3 is in the stratified combustionmode, the program proceeds to a step S292, wherein the high coolanttemperature-dependent correction term IGTWR is calculated in the samemanner as at the step S291 to calculate the high coolanttemperature-dependent correction term IGTWR for the stratifiedcombustion mode, followed by terminating the program. In this case, acurve indicated by a broken line in FIG. 25 represents table values ofthe high coolant temperature-dependent correction term IGTWR for thestratified combustion mode. As is apparent from the figure, this tableis configured such that the table value has a tendency similar to thatfor the homogeneous combustion mode but is smaller than the same. Thatis, the amount of retardation of the ignition timing IG is configured tobe smaller than that for the homogeneous combustion mode, for thefollowing reasons (1) and (2):

[0262] (1) First, in the stratified combustion mode, fuel is injected tothe recess 3 d of the piston 3 a, and the fuel is evaporated by thermalexchange with this portion of the piston 3 a to generate an air-fuelmixture, so that as the engine coolant temperature TW is higher, theevaporation of the mixture is promoted.

[0263] (2) Further, in the stratified combustion mode, the air-fuelmixture is ignited at the time of reaching the vicinity of the sparkplug 5, and the mixture at the time of ignition is surrounded by air, sothat knocking hardly occurs differently from the case of the homogeneouscombustion mode.

[0264] It should be noted that the IGTWR-calculating process may beexecuted in a manner illustrated in FIG. 26. As shown in this figure,steps S295, S296 of this process are the same as the steps S290, S291 inFIG. 24, and hence only a step S297 will be described. At the step S297,the high coolant temperature-dependent correction term IGTWR for thestratified combustion mode is set to a value of 0. That is, in thisprocess, when the engine is in the stratified combustion mode, theretardation of the ignition timing by the high coolanttemperature-dependent correction term IGTWR is omitted. This is becauseknocking hardly occurs in the stratified combustion mode as describedabove.

[0265] Next, the combustion mode transition-determining process carriedout for transition between the homogeneous combustion mode and thestratified combustion mode will be described with reference to FIG. 27.This process is executed whenever a predetermined time period (e.g. 10msec.) elapses, according to settings of a program timer.

[0266] First, at a step S300, it is determined whether or not thecombustion mode transition flag F_CMOD assumes 0. If the answer to thisquestion is affirmative (YES), i.e. if the engine 3 is not in thetwo-stage fuel injection combustion mode, the program proceeds to a stepS301, wherein it is determined whether or not the immediately precedingvalue S_EMODn-1 of the combustion mode monitor S_EMOD assumes 2 and atthe same time the present value S_EMODn does not assume 2. This is fordetermining whether or not the operating region of the engine 3 hasshifted from the stratified combustion region to the homogeneouscombustion region shown in FIG. 3.

[0267] If the answer to this question is affirmative (YES), it is judgedthat the operating region of the engine 3 has shifted in the presentloop from the stratified combustion region to the homogeneous combustionregion, so that the two-stage fuel injection combustion mode should bestarted, and hence the program proceeds to a step S302, wherein thecombustion mode transition flag F_CMOD indicative of this fact is set to1, followed by terminating the program.

[0268] On the other hand, if the answer to the question of the step S301is negative (NO), the program proceeds to a step S303, wherein it isdetermined whether or not the immediately preceding value S_EMODn-1 ofthe combustion mode monitor S_EMOD does not assume 2, but at the sametime the present value S_EMODn assumes 2. If the answer to this questionis affirmative (YES), it is judged that the operating region of theengine 3 has shifted in the present loop from the homogeneous combustionregion to the stratified combustion region, and hence the engine 3should be caused to enter the two-stage fuel injection combustion mode,so that the program proceeds to a step S304, wherein similarly to thestep S302, the combustion mode transition flag F_CMOD is set to 1,followed by terminating the program.

[0269] If the answer to the question of the step S303 is negative (NO),i.e. if the operating region of the engine 3 has not shifted in thepresent loop between the stratified combustion region and thehomogeneous combustion region, the program proceeds to a step S305,wherein the count tmCCMOD of a two-stage fuel injection combustion modetimer is set to 0, followed by terminating the program. The two-stagefuel injection combustion mode timer determines the termination timingof a duration period of the two-stage fuel injection combustion mode.

[0270] On the other hand, if the answer to the question of the step S300is negative (NO), i.e. if the engine 3 is in the two-stage fuelinjection combustion mode, the program proceeds to a step S306, whereinthe count tmCCMOD of the two-stage fuel injection combustion mode timeris incremented. Then, the program proceeds to a step S307, wherein thecount tmCCMOD incremented at the step S306 has exceeded a predeterminedtime period X_TMCCMOD (value corresponding to this period). Thepredetermined time period X_TMCCMOD (parameter indicative of response ofthe EGR control valve 16) represents the response of the EGR controlvalve 16, and set as a closing time period which the EGR valve 16 takesto close from a valve lift amount of 100% to a valve lift amount of 5%.

[0271] If the answer to this question is negative (NO), i.e. iftmCCMOD≦X_TMCCMOD holds, which means that the predetermined time periodX_TMCCMOD has not elapsed from the start of the two-stage fuel injectioncombustion mode, the present program is immediately terminated tocontinue the two-stage fuel injection combustion mode.

[0272] On the other hand, if the answer to the question of the step S307is affirmative (YES), i.e. if tmCCMOD >X_TMCCMOD holds, which means thepredetermined time period X_TMCCMOD has elapsed after the start of thetwo-stage fuel injection combustion mode, it is determined that thetwo-stage fuel injection combustion mode should be terminated, so thatthe program proceeds to a step S308, wherein the combustion mode flagF_CMOD is set to 0 to indicate the above fact, followed by terminatingthe program.

[0273] As described above, the duration period of the two-stage fuelinjection combustion mode is determined based on the predetermined timeperiod X_TMCCMOD which is the closing time period which the EGR controlvalve 16 takes to close. As described above, the target valve liftamount LCMD of the EGR control valve 16 generally increases between thestratified combustion mode and the homogeneous combustion mode.Therefore, during transition between these modes, it takes time for theEGR control valve 16 to change to the target valve lift amount LCMD forthe mode after the transition. Therefore, by setting the predeterminedtime period X_TMCCMOD which takes the response of the EGR control valve16 into account, to the duration period of the two-stage fuel injectioncombustion mode as described above, the two-stage fuel injectioncombustion mode can be continued until the valve lift amount of the EGRcontrol valve 16 is positively changed to that for the combustion modeafter the two-stage fuel injection combustion mode. As a result, thestable combustion upon termination of the two-stage fuel injectioncombustion mode can be ensured, whereby e.g. stable drivability can beensured with small changes in engine output between before and after thetwo-stage fuel injection combustion mode. Further, since the durationperiod of the two-stage fuel injection combustion mode is determined asdescribed above, it is possible to reduce the duration period to aminimum required period, whereby degradation of exhaust emissioncharacteristics due to an increase in NOx can be controlled to the lowerlevel.

[0274] It should be noted that the combustion modetransition-determining process may be carried out by a methodillustrated in FIG. 28 in place of the method described above. Themethod illustrated in FIG. 28 determines the duration period of thetwo-stage fuel injection combustion mode by using a difference dLACT invalve lift amount in place of the count of the two-stage fuel injectioncombustion mode timer. As shown in FIG. 28, steps S310 to S314 are thesame as the steps S300 to S304 of the FIG. 27 process, so that detaileddescription of the steps S310 to S314 is omitted, but only differentpoints will be described.

[0275] In the process, if the answer to the question of the step S313 isnegative (NO), i.e. if the engine 3 is not in the two-stage fuelinjection combustion mode, the present program is immediatelyterminated.

[0276] On the other hand, if the answer to the question of the step S310is negative (NO), i.e. if F_CMOD=1 holds, the program proceeds to a stepS315, wherein the difference dLACT in valve lift amount is calculated.The difference dLACT (parameter indicative of the response of the EGRcontrol valve 16) is calculated as the absolute value of a differencebetween the target valve lift amount LCMD and the actual valve liftamount LACT detected by the valve lift amount sensor 26.

[0277] Next, the program proceeds to a step S316, wherein it isdetermined whether or not the difference dLACT calculated at the stepS315 is smaller than a predetermined difference X_DlactCM. Thepredetermined difference X_DlactCM is a threshold value for determiningwhether or not the actual valve lift amount LACT of the EGR controlvalve 16 is converged or changed to the target valve lift amount LCMD,and represents the response of the EGR control valve 16.

[0278] If the answer to this question is negative (NO), i.e. ifdLACT≧X_DlactCM holds, it is judged that the actual lift amount LACT isnot close enough to the target valve lift amount LACT, so that theprogram is immediately terminated.

[0279] On the other hand, if the answer to the question of the step S316is affirmative (YES), i.e. if dLACT<X_DlactCM holds, it is judged thatthe actual valve lift amount of the EGR control valve 16 has becomeclose enough to the target valve lift amount LCMD after the start of thetwo-stage fuel injection combustion mode, so that to terminate thetwo-stage fuel injection combustion mode, the program proceeds to a stepS317, wherein the combustion mode transition flag F_CMOD is set to 0 toindicate this fact, followed by terminating the program. As describedabove, depending on whether the difference dLACT has become smaller thanthe predetermined difference X_DlactCM, i.e. if the actual valve liftamount of the EGR control valve 16 has substantially reached the targetvalve lift amount LCMD, the termination timing of the two-stage fuelinjection combustion mode is determined, so that the same advantageouseffects as obtained by the FIG. 27 process can be obtained.

[0280] As described above, according to the control system 1 of thepresent embodiment, the fuel injection time period ToutD (=ToutdbD)which corresponds to a fuel injection amount during the compressionstroke in the two-stage fuel injection combustion mode is determinedbased on the engine rotational speed NE. This enables the fuel injectiontime period ToutD during the compression stroke in the two-stage fuelinjection combustion mode to be set to the minimum amount in whichinjected fuel can be ignited, while causing a change in the state offlow of air within the cylinder caused by a change in the enginerotational speed NE to be reflected thereon even when this changeoccurs. Conversely, it is possible to secure as long a fuel injectiontime period ToutH as possible during the intake stroke in which amixture in an easily flammable condition is produced. As a result, it ispossible to ensure stable combustion of fuel injected in the two-stagefuel injection combustion mode as well as excellent fuel economy anddrivability.

[0281] Further, the injection termination timings IJLOGH, IJLOGD duringthe intake stroke and the compression stroke in the two-stage fuelinjection combustion mode are determined as the injection terminationtimings IJLOGH, IJLOGD for the homogeneous combustion mode and thestratified combustion mode, respectively. More specifically, they arecalculated by using the basic injection termination timing INJMAPF forthe homogeneous combustion mode and that for the stratified combustionmode stored in the ROM 2 c and the coolant temperature-dependentcorrection term IJTW, independence on the engine coolant temperature TW,the engine rotational speed NE and the fuel injection time periodsToutH, ToutD. This makes it possible to execute the fuel injection atproper timings during the intake stroke and the compression stroke,respectively, in the two-stage fuel injection combustion mode, and sinceit is not necessary to provide a ROM or the like separately oradditionally for use in determining the fuel injection terminationtimings IJLOGH, IJLOGD, or increase the capacity thereof for the samepurpose, the manufacturing costs can be reduced by so much amount.

[0282] Further, since the map value IGMAP of the ignition timing IG inthe two-stage fuel injection combustion mode is determined based on theengine rotational speed NE which has a significant influence on thestability of combustion in this mode and the fuel injection terminationstiming IJLOGD for the stratified combustion mode, it is possible toensure further stable combustion by setting the map value IGMAP to avalue that ensures stable ignition in the two-stage fuel injectioncombustion mode.

[0283] Further, the duration period of the two-stage fuel injectioncombustion mode is determined based on the predetermined time periodX_TMCCMOD or the difference dLACT, in which the response of the EGRcontrol valve 16 is taken into account. This enables the two-stage fuelinjection combustion mode to be continued until the actual valve liftamount LACT of the EGR control valve 16 is positively changedsubstantially to the target valve lift amount LCMD for the combustionmode after the two-stage fuel injection combustion mode. As a result,the stable combustion after the two-stage fuel injection combustion modecan be ensured, whereby stable drivability in which the engine outputvariation is small can be ensured. Further, since the duration period ofthe two-stage fuel injection combustion mode is determined as describedabove, it can be reduced to the minimum required time period, wherebythe degradation of fuel economy can be prevented.

[0284] Further, in accordance with each combustion mode, the finaltarget air-fuel ratio KCMD, the target valve lift amount LCMD, fuelinjection timing θinj, and the ignition timing IG are set, and the useof the thus determined values of these parameters for fuel injectioncontrol enables the two-stage fuel injection combustion mode and thecombustion modes before and after the two-stage fuel injectioncombustion mode to be controlled such that the torque generated by theengine 3 becomes equal to the demanded torque PME. As a result,differently from the prior art, it is possible to prevent torque stepsfrom occurring upon the start and the termination of the two-stage fuelinjection combustion mode.

[0285] Further, particularly in the case of an internal combustionengine of in-cylinder injection type as in the present embodiment, inwhich the injector 4 is disposed substantially in the center of a topwall of the combustion chamber 3 c, and fuel is injected from theinjector 4 toward the piston 3 a, it has been confirmed by experimentthat the advantageous effects of the present embodiment described abovecan be obtained in an optimized manner, though data of the experiment isnot shown here.

[0286] It should be noted that the invention is not particularly limitedto the engine 3 of in-cylinder injection type having each injector 4 isarranged in a substantially control potion of a top wall of acorresponding combustion chamber 3 c, according to the presentembodiment, but the invention can be applied to other engines ofin-cylinder injection type which has -injectors differently arranged,for instance.

[0287] It is further understood by those skilled in the art that theforegoing is a preferred embodiment of the invention, and that variouschanges and modifications may be made without departing from the spiritand scope thereof.

What is claimed is:
 1. A control system for an internal combustionengine of an in-cylinder fuel injection type, the engine being operatedwhile switching a combustion mode thereof between a homogeneouscombustion mode in which fuel injection into each cylinder is performedduring an intake stroke, a stratified combustion mode in which the fuelinjection into the cylinder is performed during a compression stroke,and a two-stage fuel injection combustion mode in which the fuelinjection into the cylinder is performed once during the intake strokeand once during the compression stroke during transition between thehomogeneous combustion mode and the stratified combustion mode, thecontrol system comprising: a demanded torque-calculating module forcalculating a demanded torque which is demanded of the engine; an enginerotational speed-detecting module for detecting a rotational speed ofthe engine; a combustion mode-determining module for determining, basedon the calculated demanded torque, which of the homogeneous combustionmode, the stratified combustion mode, and the two-stage fuel injectioncombustion mode should be selected as the combustion mode; and a fuelinjection amount-determining module for determining an amount of fuel tobe injected during the compression stroke in the two-stage fuelinjection combustion mode, based on the detected rotational speed of theengine.
 2. A control system according to claim 1, further including: astorage module for storing data of a fuel injection timing for thehomogeneous combustion mode and a fuel injection timing for thestratified combustion mode, which are set in advance in a mannercorrelated to an operating condition of the engine; an operatingcondition-detecting module for detecting the operating condition of theengine; and a fuel injection timing-setting module for setting a fuelinjection timing during the intake stroke and a fuel injection timingduring the compression stroke in the two-stage fuel injection combustionmode, to the fuel injection timing for the homogeneous combustion modeand the fuel injection timing for the stratified combustion mode,respectively, in dependence on the detected operating condition of theengine.
 3. A control system according to claim 2, further including anignition timing-determining module for determining ignition timing forthe two-stage fuel injection combustion mode, based on the detectedrotational speed of the engine and the fuel injection timing for thestratified combustion mode.
 4. A control system according to claim 1,wherein the engine includes an intake system, and the control systemfurther including: an EGR control valve for controlling an EGR rate atwhich exhaust gases are recirculated into the intake system; and aduration period-determining module for determining a duration period ofthe two-stage fuel injection combustion mode, based on a parameterindicative of response of the EGR control valve.
 5. A control systemaccording to claim 2, wherein the engine includes an intake system, andthe control system further including: an EGR control valve forcontrolling an EGR rate at which exhaust gases are recirculated into theintake system; and a duration period-determining module for determininga duration period of the two-stage fuel injection combustion mode, basedon a parameter indicative of response of the EGR control valve.
 6. Acontrol system according to claim 3, wherein the engine includes anintake system, and the control system further including: an EGR controlvalve for controlling an EGR rate at which exhaust gases arerecirculated into the intake system; and a duration period-determiningmodule for determining a duration period of the two-stage fuel injectioncombustion mode, based on a parameter indicative of response of the EGRcontrol valve.
 7. A control system according to claim 1, wherein saidfuel injection amount-determining module sets the amount fuel to beinjected during the compression stroke in the two-stage fuel injectioncombustion mode to a smaller valve as the rotational speed of the engineis higher.
 8. A control system according to claim 7, including anapplied mode-changing module for causing a total amount of fuel for thetwo-stage fuel injection combustion mode to be injected at an injectiontiming for the stratified combustion mode, if a sum total of the amountof fuel to be injected during the compression stroke in the two-stagefuel injection combustion mode determined by said fuel injectionamount-determining module and a predetermined fuel injection amount isequal to or smaller than the total amount of fuel.
 9. A control systemaccording to claim 2, wherein the homogeneous combustion mode comprisesa stoichiometric combustion mode in which an air-fuel mixture having anair-fuel ratio equal to or richer than a stoichiometric air fuel ratiois burned, and a lean combustion mode in which an air-fuel mixturehaving an air-fuel ratio leaner than the stoichiometric air-fuel ratiois burned, and wherein said fuel injection timing-setting module setsthe fuel injection timing during the intake stroke in the two-stage fuelinjection combustion mode to a fuel injection timing for thestoichiometric combustion mode when a combustion mode preceding thetwo-stage fuel injection combustion mode is the stoichiometriccombustion mode, and to a fuel injection timing for the lean combustionmode when the combustion mode preceding the two-stage fuel injectioncombustion mode is other than the stoichiometric combustion mode.
 10. Acontrol system according to claim 1, further including an operationcontrol values-setting module for setting at least a target air-fuelratio, a target EGR rate, a fuel injection timing, and an ignitiontiming, in dependence on the combustion mode determined to be selected.11. A control system according to claim 1, wherein the engine includes afuel injection valve for injecting the fuel into the cylinder, thecylinder having a top wall facing a combustion chamber, and wherein thefuel injection valve is arranged in a central portion of the top wallsuch that the fuel injection valve injects the fuel downward therefrom.12. A control system according to claim 2, wherein the engine includes afuel injection valve for injecting the fuel into the cylinder, thecylinder having a top wall facing a combustion chamber, and wherein thefuel injection valve is arranged in a central portion of the top wallsuch that the fuel injection valve injects the fuel downward therefrom.13. A control system according to claim 3, wherein the engine includes afuel injection valve for injecting the fuel into the cylinder, thecylinder having a top wall facing a combustion chamber, and wherein thefuel injection valve is arranged in a central portion of the top wallsuch that the fuel injection valve injects the fuel downward therefrom.14. A control system according to claim 4, wherein the engine includes afuel injection valve for injecting the fuel into the cylinder, thecylinder having a top wall facing a combustion chamber, and wherein thefuel injection valve is arranged in a central portion of the top wallsuch that the fuel injection valve injects the fuel downward therefrom.15. A control method for an internal combustion engine of an in-cylinderfuel injection type, the engine being operated while switching acombustion mode thereof between a homogeneous combustion mode in whichfuel injection into each cylinder is performed during an intake stroke,a stratified combustion mode in which the fuel injection into thecylinder is performed during a compression stroke, and a two-stage fuelinjection combustion mode in which the fuel injection into the cylinderis performed once during the intake stroke and once during thecompression stroke during transition between the homogeneous combustionmode and the stratified combustion mode, the control method comprisingthe steps of: calculating a demanded torque which is demanded of theengine; detecting a rotational speed of the engine; determining, basedon the calculated demanded torque, which of the homogeneous combustionmode, the stratified combustion mode, and the two-stage fuel injectioncombustion mode should be selected as the combustion mode; anddetermining an amount of fuel to be injected during the compressionstroke in the two-stage fuel injection combustion mode, based on thedetected rotational speed of the engine.
 16. A control method accordingto claim 15, further including the steps of: storing data of a fuelinjection timing for the homogeneous combustion mode and a fuelinjection timing for the stratified combustion mode, which are set inadvance in a manner correlated to an operating condition of the engine;detecting the operating condition of the engine; and setting a fuelinjection timing during the intake stroke and a fuel injection timingduring the compression stroke in the two-stage fuel injection combustionmode, to the fuel injection timing for the homogeneous combustion modeand the fuel injection timing for the stratified combustion mode,respectively, in dependence on the detected operating condition of theengine.
 17. A control method according to claim 16, further includingthe step of determining ignition timing for the two-stage fuel injectioncombustion mode, based on the detected rotational speed of the engineand the fuel injection timing for the stratified combustion mode.
 18. Acontrol method according to claim 15, wherein the engine includes anintake system and an EGR control valve, and the control method furtherincluding the steps of: controlling an EGR rate at which exhaust gasesare recirculated into the intake system via the EGR control valve; anddetermining a duration period of the two-stage fuel injection combustionmode, based on a parameter indicative of response of the EGR controlvalve.
 19. A control method according to claim 16, wherein the engineincludes an intake system and an EGR control valve, and the controlmethod further including the steps of: controlling an EGR rate at whichexhaust gases are recirculated into the intake system via the EGRcontrol valve; and determining a duration period of the two-stage fuelinjection combustion mode, based on a parameter indicative of responseof the EGR control valve.
 20. A control method according to claim 17,wherein the engine includes an intake system and an EGR control valve,and the control method further including the steps of: controlling anEGR rate at which exhaust gases are recirculated into the intake systemvia the EGR control valve; and determining a duration period of thetwo-stage fuel injection combustion mode, based on a parameterindicative of response of the EGR control valve.
 21. A control methodaccording to claim 15, wherein the step of determining the amount offuel to be injected includes setting the amount fuel to be injectedduring the compression stroke in the two-stage fuel injection combustionmode to a smaller valve as the rotational speed of the engine is higher.22. A control method according to claim 21, including the step ofcausing a total amount of fuel for the two-stage fuel injectioncombustion mode to be injected at an injection timing for the stratifiedcombustion mode, if a sum total of the amount of fuel to be injectedduring the compression stroke in the two-stage fuel injection combustionmode determined by the step of determining the amount of fuel to beinjected and a predetermined fuel injection amount is equal to orsmaller than the total amount of fuel.
 23. A control method according toclaim 16, wherein the homogeneous combustion mode comprises astoichiometric combustion mode in which an air-fuel mixture having anair-fuel ratio equal to or richer than a stoichiometric air fuel ratiois burned, and a lean combustion mode in which an air-fuel mixturehaving an air-fuel ratio leaner than the stoichiometric air-fuel ratiois burned, and wherein the step of setting the fuel injection timingincludes setting the fuel injection timing during the intake stroke inthe two-stage fuel injection combustion mode to a fuel injection timingfor the stoichiometric combustion mode when a combustion mode precedingthe two-stage fuel injection combustion mode is the stoichiometriccombustion mode, and to a fuel injection timing for the lean combustionmode when the combustion mode preceding the two-stage fuel injectioncombustion mode is other than the stoichiometric combustion mode.
 24. Acontrol method according to claim 15, including the step of setting atleast a target air-fuel ratio, a target EGR rate, a fuel injectiontiming, and an ignition timing, in dependence on the combustion modedetermined to be selected.
 25. A control method according to claim 15,wherein the engine includes a fuel injection valve for injecting thefuel into the cylinder, the cylinder having a top wall facing acombustion chamber, and wherein the fuel injection valve is arranged ina central portion of the top wall such that the fuel injection valveinjects the fuel downward therefrom.
 26. A control method according toclaim 16, wherein the engine includes a fuel injection valve forinjecting the fuel into the cylinder, the cylinder having a top wallfacing a combustion chamber, and wherein the fuel injection valve isarranged in a central portion of the top wall such that the fuelinjection valve injects the fuel downward therefrom.
 27. A controlmethod according to claim 17, wherein the engine includes a fuelinjection valve for injecting the fuel into the cylinder, the cylinderhaving a top wall facing a combustion chamber, and wherein the fuelinjection valve is arranged in a central portion of the top wall suchthat the fuel injection valve injects the fuel downward therefrom.
 28. Acontrol method according to claim 18, wherein the engine includes a fuelinjection valve for injecting the fuel into the cylinder, the cylinderhaving a top wall facing a combustion chamber, and wherein the fuelinjection valve is arranged in a central portion of the top wall suchthat the fuel injection valve injects the fuel downward therefrom. 29.An engine control unit including a control program for causing acomputer to carry out control of an internal combustion engine of anin-cylinder fuel injection type, the engine being operated whileswitching a combustion mode thereof between a homogeneous combustionmode in which fuel injection into each cylinder is performed during anintake stroke, a stratified combustion mode in which the fuel injectioninto the cylinder is performed during a compression stroke, and atwo-stage fuel injection combustion mode in which the fuel injectioninto the cylinder is performed once during the intake stroke and onceduring the compression stroke during transition between the homogeneouscombustion mode and the stratified combustion mode, wherein the controlprogram causes the computer to calculate a demanded torque which isdemanded of the engine, detect a rotational speed of the engine,determine, based on the calculated demanded torque, which of thehomogeneous combustion mode, the stratified combustion mode, and thetwo-stage fuel injection combustion mode should be selected as thecombustion mode, and determine an amount of fuel to be injected duringthe compression stroke in the two-stage fuel injection combustion mode,based on the detected rotational speed of the engine.
 30. An enginecontrol unit according to claim 29, wherein the control program furthercauses the computer to store data of a fuel injection timing for thehomogeneous combustion mode and a fuel injection timing for thestratified combustion mode, which are set in advance in a mannercorrelated to an operating condition of the engine, detect the operatingcondition of the engine, and set a fuel injection timing during theintake stroke and a fuel injection timing during the compression strokein the two-stage fuel injection combustion mode, to the fuel injectiontiming for the homogeneous combustion mode and the fuel injection timingfor the stratified combustion mode, respectively, in dependence on thedetected operating condition of the engine.
 31. An engine control unitaccording to claim 30, wherein the control program further causes thecomputer to determine ignition timing for the two-stage fuel injectioncombustion mode, based on the detected rotational speed of the engineand the fuel injection timing for the stratified combustion mode.
 32. Anengine control unit according to claim 29, wherein the engine includesan intake system and an EGR control valve, and wherein the controlprogram further causes the computer to control an EGR rate at whichexhaust gases are recirculated via the EGR control valve into the intakesystem, and determine a duration period of the two-stage fuel injectioncombustion mode, based on a parameter indicative of response of the EGRcontrol valve.
 33. An engine control unit according to claim 30, whereinthe engine includes an intake system and an EGR control valve, andwherein the control program further causes the computer to control anEGR rate at which exhaust gases are recirculated via the EGR controlvalve into the intake system, and determine a duration period of thetwo-stage fuel injection combustion mode, based on a parameterindicative of response of the EGR control valve.
 34. An engine controlunit according to claim 31, wherein the engine includes an intake systemand an EGR control valve, and wherein the control program further causesthe computer to control an EGR rate at which exhaust gases arerecirculated via the EGR control valve into the intake system, anddetermine a duration period of the two-stage fuel injection combustionmode, based on a parameter indicative of response of the EGR controlvalve.
 35. An engine control unit according to claim 29, wherein whenthe control program causes the computer to determine the amount of fuelto be injected, the control program causes the computer to set theamount fuel to be injected during the compression stroke in thetwo-stage fuel injection combustion mode to a smaller valve as therotational speed of the engine is higher.
 36. An engine control unitaccording to claim 35, wherein the control program causes the computerto cause a total amount of fuel for the two-stage fuel injectioncombustion mode to be injected at an injection timing for the stratifiedcombustion mode, if a sum total of the determined amount of fuel to beinjected during the compression stroke in the two-stage fuel injectioncombustion mode and a predetermined fuel injection amount is equal to orsmaller than the total amount of fuel.
 37. An engine control unitaccording to claim 30, wherein the homogeneous combustion mode comprisesa stoichiometric combustion mode in which an air-fuel mixture having anair-fuel ratio equal to or richer than a stoichiometric air fuel ratiois burned, and a lean combustion mode in which an air-fuel mixturehaving an air-fuel ratio leaner than the stoichiometric air-fuel ratiois burned, and wherein when the control program causes the computer toset the fuel injection timing the control program causes the computer toset the fuel injection timing during the intake stroke in the two-stagefuel injection combustion mode to a fuel injection timing for thestoichiometric combustion mode when a combustion mode preceding thetwo-stage fuel injection combustion mode is the stoichiometriccombustion mode, and to a fuel injection timing for the lean combustionmode when the combustion mode preceding the two-stage fuel injectioncombustion mode is other than the stoichiometric combustion mode.
 38. Anengine control unit according to claim 29, wherein the control programcauses the computer to set at least a target air-fuel ratio, a targetEGR rate, a fuel injection timing, and an ignition timing, in dependenceon the combustion mode determined to be selected.
 39. An engine controlunit according to claim 29, wherein the engine includes a fuel injectionvalve for injecting the fuel into the cylinder, the cylinder having atop wall facing a combustion chamber, and wherein the fuel injectionvalve is arranged in a central portion of the top wall such that thefuel injection valve injects the fuel downward therefrom.
 40. An enginecontrol unit according to claim 30, wherein the engine includes a fuelinjection valve for injecting the fuel into the cylinder, the cylinderhaving a top wall facing a combustion chamber, and wherein the fuelinjection valve is arranged in a central portion of the top wall suchthat the fuel injection valve injects the fuel downward therefrom. 41.An engine control unit according to claim 31, wherein the engineincludes a fuel injection valve for injecting the fuel into thecylinder, the cylinder having a top wall facing a combustion chamber,and wherein the fuel injection valve is arranged in a central portion ofthe top wall such that the fuel injection valve injects the fueldownward therefrom.
 42. An engine control unit according to claim 32,wherein the engine includes a fuel injection valve for injecting thefuel into the cylinder, the cylinder having a top wall facing acombustion chamber, and wherein the fuel injection valve is arranged ina central portion of the top wall such that the fuel injection valveinjects the fuel downward therefrom.